java吧 关注:1,274,297贴子:12,785,096
  • 7回复贴,共1

菜鸟求助啊,师傅出的题目,好吧,我好菜~~

只看楼主收藏回复

class Dog { String name; public static void main (String[] args) { // make a Dog object and access it Dog dog1 = new Dog(); dog1.bark(); dog1.name = “Bart”; // now make a Dog array Dog[] myDogs = new Dog[3]; // and put some dogs in it myDogs[0] = new Dog(); myDogs[1] = new Dog(); myDogs[2] = dog1; // now access the Dogs using the array // references myDogs[0].name = “Fred”; myDogs[1].name = “Marge”; // Hmmmm... what is myDog


IP属地:广东来自手机贴吧1楼2012-08-30 10:37回复
    好乱……


    IP属地:江苏2楼2012-08-30 10:38
    回复
      2025-08-17 08:36:14
      广告
      不感兴趣
      开通SVIP免广告
      啥问题


      3楼2012-08-30 10:38
      回复
        好乱,手机发贴…唉…居然还不全……算了,版主麻烦版主删贴吧


        IP属地:广东来自手机贴吧4楼2012-08-30 10:39
        收起回复
          myDog is a Dog array of length 3


          5楼2012-08-30 10:40
          回复