black

SCJP程序员认证考试

登录

单项选择题

1. package foo; 2.  3. import java.util.Vector; 4.  5. protected class MyVector Vector { 6. init i = 1; 7. public MyVector() { 8. i = 2; 9. } 10. } 11.  12. public class MyNewVector extends MyVector { 13. public MyNewVector() { 14. i = 4; 15. } 16. public static void main(String args[]) { 17. MyVector v = new MyNewVector(); 18. } 19. } What is the result?()  

A. Compilation succeeds.
B. Compilation fails because of an error at line 5.
C. Compilation fails because of an error at line 6.
D. Compilation fails because of an error at line 14.
E. Compilation fails because of an error at line 17.

相关考题

单项选择题 public class Alpha1 {  public static void main( String[] args ) {  boolean flag; int i=0;  do {  flag = false;  System.out.println( i++ );  flag = i < 10;  continue;  } while ( (flag)? true:false );  }  }  What is the result?()

单项选择题 ClassOne.java:1.packagecom.abe.pkg1;2.publicclassClassOne{3.privatecharvar=‘a’;4.chargetVar(){returnvar;}5.}ClassTest.java:1.packagecom.abe.pkg2;2.importcom.abc.pkg1.ClassOne;3.publicclassClassTestextendsClassOne{4.publicstaticvoidmain(String[]args){5.chara=newClassOne().getVar();6.charb=newClassTest().getVar();7.}8.}Whatistheresult?()

单项选择题 public class Foo {  public static void main(String[] args) {  try {  return;  } finally {  System.out.println( “Finally” );  }  }  }  What is the result?()

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

备案号:湘ICP备2022003000号-2