class super { public int getLength() {return 4;} } public class Sub extends Super { public long getLength() {return 5;} public static void main (Stringargs) { super sooper = new Super (); Sub sub = new Sub(); System.out.printIn( sooper.getLength()+ “,” + sub.getLength() }; } What is the output?()
第1题:
The lower-level classes (known as subclasses or derived classes) ( ) state and behavior from the higher-level class (known as a super class or base class).
A.request B.inherit C.invoke D.accept
第2题:
class A { A() { } } class B extends A { } Which two statements are true?()
第3题:
A.insert a call to this() in the Car constructor
B.insert a call to this() in the MeGo constructor
C.insert a call to super() in the MeGo constructor
D.insert a call to super(vin) in the MeGo constructor
E.change the wheelCount variable in Car to protected
F.change line 3 in the MeGo class to super.wheelCount = 3;
第4题:
class super { public int getLength() {return 4;} } public class Sub extends Super { public long getLength() {return 5;} public static void main (String[]args) { super sooper = new Super (); Sub sub = new Sub(); System.out.printIn( sooper.getLength()+ “,” + sub.getLength() }; } What is the output?()
第5题:
Which statements concerning the following code are true?() class a { public a() {} public a(int i) { this(); } } class b extends a { public boolean b(String msg) { return false; } } class c extends b { private c() { super(); } public c(String msg) { this(); } public c(int i) {} }
第6题:
第7题:
class Super { public int getLenght( ) { return 4; } } public class Sub extends Super { public long getLenght( ) { return 5; } public static void main(String[] args) { Super sooper = new Super( ); Sub sub = new Sub( ); System.out.println( sooper.getLenght( ) + “,” + sub.getLenght( ) ); } } What is the output?()
第8题:
已知:Manager extends Employee观察:public Manager(String n,double s,int year,int month,int day) { super(n,s,year,month,day); bonus=0; }其中super是 ( )
A.Object类
B.Manager类
C.Employee类
D.Class类
第9题:
class super { public float getNum() {return 3.0f;} } public class Sub extends Super { } Which method, placed at line 6, will cause a compiler error?()
第10题:
Which two login-class permissions could permit a user to view the system hierarchy of the active configuration?()