class Man extends Dog { }
class Man implements Dog { }
class Man { private BestFriend dog; }
class Man { private Dog bestFriend; }
class Man { private Dog<bestFriend>; }
class Man { private BestFriend<dog>; }
第1题:
He is the man()dog bit me.
Athat
Bwhich
Cwho’s
Dwhose
第2题:
He is the man()dog bit me.
第3题:
10. interface Jumper { public void jump(); } ...... 20. class Animal {} ...... 30. class Dog extends Animal { 31. Tail tail; 32. } ...... 40. class Beagle extends Dog implements Jumper { 41. public void jump() { } 42. } ....... 50. class Cat implements Jumper { 51. public void jump() { } 52. } Which three are true?()
第4题:
public class Pet{ private String name; public Pet(){ System.out.print(1); } public Pet(String name){ System.out.print(2); } } public class Dog extends Pet{ public Dog(){ System.out.print(4); } public Dog(String name){ super(name); System.out.print(3); } } 执行new Dog(“棕熊”);后程序输出是哪项?()
第5题:
Which Man class properly represents the relationship "Man has a best friend who is a Dog"?()
第6题:
public class Pet{ private String name; public Pet(){ System.out.print(1); } public Pet(String name){ System.out.print(2); } } public class Dog extends Pet{ public Dog(){ System.out.print(4); } public Dog(String name){ this(); System.out.print(3); } } 执行new Dog(“棕熊”);后程序输出是哪项?()
第7题:
Which Man class properly represents the relationship "Man has a best friend who is a Dog"?()
第8题:
23
13
123
321
第9题:
class Man extends Dog { }
class Man implements Dog { }
class Man { private BestFriend dog; }
class Man { private Dog bestFriend; }
class Man { private Dog
class Man { private BestFriend
第10题:
class Man extends Dog{}
class Man implements Dog{}
class Man{private BestFriend dog;}
class Man{private Dog bestFriend;}
class Man{private Dog
class Man{private BestFriend
第11题:
that
which
whose
第12题:
class Man extends Dog { }
class Man implements Dog { }
class Man { private BestFriend dog; }
class Man { private Dog bestFriend; }
class Man { private Dog
class Man { private BestFriend
第13题:
He is the man()dog bit me.
第14题:
public class Pet{ private String name; public Pet(){ System.out.print(1); } public Pet(String name){ System.out.print(2); } } public class Dog extends Pet{ public Dog(String name){ System.out.print(3); } } 执行new Dog(“棕熊”);后程序输出是哪项?()
第15题:
public class Pet{ private String name; public Pet(String name){ this.name = name; } public void speak(){ System.out.print(name); } } public class Dog extends Pet{ public Dog(String name){ super(name); } public void speak(){ super.speak(); System.out.print(“ Dog ”); } } 执行代码 Pet pet = new Dog(“京巴”); pet.speak(); 后输出的内容是哪项?()
第16题:
现有: class Dog{ } class Harrier extends Dog { } class DogTest{ public static void main (String [] args) { Dog dl=new Dog(); Harrier hl=new Harrier(); Dog d2=hl; Harrier h2= (Harrier) d2; Harrier h3=d2; } } 下面哪一项是正确的?()
第17题:
public class Pet{ public void speak(){ System.out.print(“ Pet ”); } } public class Cat extends Pet{ public void speak(){ System.out.print(“ Cat ”); } } public class Dog extends Pet{ public void speak(){ System.out.print(“ Dog ”); } } 执行代码 Pet[] p = {new Cat(),new Dog(),new Pet()}; for(int i=0;i〈p.length;i++) p[i].speak(); 后输出的内容是哪项?()
第18题:
Which Man clsss properly represents the relationship "Man has a best friend who is a Dog"?()
第19题:
33
13
23
123
第20题:
class Man extends Dog { }
class Man implements Dog { }
class Man { private BestFriend dog; }
class Man { private Dog bestFriend; }
class Man { private Dog<bestFriend>; }
class Man { private BestFriend<dog>; }
第21题:
143
423
243
1134
第22题:
京巴
京巴 Dog
null
Dog京巴
第23题:
Cat is-a Animal
Cat is-a Jumper
Dog is-a Animal
Dog is-a Jumper
Cat has-a Animal
Beagle has-a Tail
Beagle has-a Jumper
第24题:
Pet Pet Pet
Cat Cat Cat
Cat Dog Pet
Cat Dog Dog