【单选题】What is the output of running class C? class A { public A() { System.out.println( "The default constructor of A is invoked"); } } class B extends A { public B(String s) { System.out.println(s); } } pu...
A.
none
B.
"The constructor of B is invoked"
C.
"The default constructor of A is invoked" "The constructor of B is invoked"
【单选题】What is the output of running class C? class A { public A() { System.out.println( "The default constructor of A is invoked"); } } class B extends A { public B() { System.out.println( "The default cons...
A.
none
B.
"The default constructor of B is invoked"
C.
"The default constructor of A is invoked" followed by "The default constructor of B is invoked"
【单选题】What is the output of running class C? class A { public A() { System.out.println( "The default constructor of A is invoked"); } } class B extends A { public B(String s) { System.out.println(s); } ...
A.
none
B.
The constructor of B is invoked
C.
The default constructor of A is invoked The constructor of B is invoked
D.
The constructor of B is invoked The default constructor of A is invoked
【单选题】What is the output of running class Test? class A { public A() { System.out.println( "The default constructor of A is invoked"); } } class B extends A { public B(String s) { System.out.println(s); } }...
A.
none
B.
"The constructor of B is invoked"
C.
"The default constructor of A is invoked" "The constructor of B is invoked"