複選題
第16題
Given:
5. class Atom{
6. Atom(){System.out.print("atom ");}
7. }
8. class Rock extends Atom{
9. Rock(String type){System.out.print(type);}
10. }
11. public class Mountain extends Rock{
12. Mountain(){
13. super("granite ");
14. new Rock("granite ");
15. }
16. public static void main(String[] a){new Mountain();}
17. }
What is the result?
A
(B) Compilation fails.
A
(C) atom granite
A
(D) granite granite
A
(E) atom granite granite
B
(C) An exception is thrown at runtime.
B
(D) atom granite atom granite
答案:F
答案:登入後查看
統計: A(17), B(36), C(32), D(121), E(25) #1157020
統計: A(17), B(36), C(32), D(121), E(25) #1157020