black

SCJP程序员认证考试

登录

单项选择题

class One { 
public One() { System.out.print(1); } 
} 
class Two extends One { 
public Two() { System.out.print(2); } 
} 
class Three extends Two { 
public Three() { System.out.print(3); } 
} 
public class Numbers{ 
public static void main( String[] argv) { new Three(); } 
} 
What is the result when this code is executed?() 

A. 1
B. 3
C. 123
D. 321
E. The code rims with no output.

相关考题

单项选择题 10. class Line {  11. public class Point { public int x,y; }  12. public Point getPoint() { return new Point(); }  13. }  14. class Triangle {  15. public Triangle() {  16. // insert code here  17. }  18. }  Which code, inserted at line 16, correctly retrieves a local instance of a Point object?()

单项选择题 10. class Line {  11. public static class Point { }  12. }  13.  14. class Triangle {  15. // insert code here  16. }  Which code, inserted at line 15, creates an instance of the Point class defined in Line?()

单项选择题 1. public class A {  2. public void doit() {  3. }  4. public String doit() {  5. return “a”;  6. }  7. public double doit(int x) {  8. return 1.0;  9. }  10.}  What is the result?()

All Rights Reserved 版权所有©易学考试网(yxkao.com)

备案号:湘ICP备2022003000号-3