black

SCJP程序员认证考试

登录

单项选择题

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?()

A. Just after line 13.
B. Just after line 14.
C. Just after line 15.
D. Just after line 16 (that is, as the method returns).

相关考题

多项选择题 Whichthreestatementsaretrue?()

多项选择题 1.classTestA{ 2.TestBb; 3.TestA(){ 4.b=newTestB(this); 5.} 6.} 7.classTestB{ 8.TestAa; 9.TestB(TestAa){ 10.this.a=a; 11.} 12.} 13.classTestAll{ 14.publicstaticvoidmain(Stringargs[]){ 15.newTestAll().makeThings(); 16.//...codecontinueson 17.} 18.voidmakeThings(){ 19.TestAtest=newTestA(); 20.} 21.} Whichtwostatementsaretrueafterline15,beforemaincompletes?()

单项选择题 public class X {  public static void main(String [] args) {  try {  badMethod();  System.out.print(“A”);  }  catch (Exception ex) {  System.out.print(“B”);  }  finally {  System.out.print(“C”);  }  System.out.print(“D”);  }  public static void badMethod() {  throw new RuntimeException();  }  }  What is the result? ()

All Rights Reserved 版权所有©财会考试题库(ckkao.com)

备案号:湘ICP备2022003000号-2