已知:
class Base {
public Base(String s) {
System.out.print(“B”);
}
}
public class Derived extends Base {
public Derived (String s) {
System.out.print(“D”);
}
public static void main(String [] args) {
new Derived (“C”);
}
}
那么结果为?
ABD
BDB
CC
D编译错误
相关试题
-
public class Derived extends Base { public Derived (String s) { System.out.
-
} public static void main(String [] args) { new B().m(); } } 那么结果为?
-
static void main(String []?args) ?{try{aMethod(0);??? }catch(Exception ex){System.out.print(excepti
-
结果是: public class MyVal { public static void main(String[] args) { MyVal m = new MyVa
-
确的是 public class Test extends Thread { public static void main(String args[]) { Test test = new Tes