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题:
在下列程序的划线处应填入的语句是( )。 class Person { private int a: } public class Man extends Person{ public int b; public static void main(String arg []){ Person p=newPerson(); Man t=new Man(); int i; _________________ } }
A.i=w;
B.i=b;
C.i=P.a;
D.i=t.b;
第2题:
He is the man()dog bit me.
Athat
Bwhich
Cwho’s
Dwhose
第3题:
He is the man( )dog bit me.
A. that
B. which
C. who's
D. whose
第4题:
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?()
第5题:
He is the man()dog bit me.
第6题:
He is the man()dog bit me.
Athat
Bwhich
Cwhose
第7题:
He is the man()dog bit me.
第8题:
在下列程序的划线处应填入的语句是class Person { private int a;}public class Man extends Person{ public int b; public static void main (String arg []){ Person p=new Person(); Man t=new Man(); int i: }}
A.i=w;
B.i=b
C.i=p.a;
D.i=t.b;
第9题:
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(“棕熊”);后程序输出是哪项?()
第10题:
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(); 后输出的内容是哪项?()