可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

1. package foo;  2.&en


1. package foo;  2.    3. import java.util.Vector;  4.    5. private class MyVector extends Vector {  6. int 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. }     The file MyNewVector.java is shown in the exhibit.  What is the result?()  

  • A Compilation will succeed.
  • B Compilation will fail at line 5.
  • C Compilation will fail at line 6.
  • D Compilation will fail at line 14.
  • E Compilation will fail at line 17.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、若a=5,b=3,c=4,逻辑表达式!(a+b)&;&;!c的值

若a=5,b=3,c=4,逻辑表达式!(a+b)&;&;!c的值为()A0B-1C1D2

2、AMPS属于()。

AMPS属于()。A1GB2GC3GD4G

3、表达式10>5&&6%3的值是()

表达式10>5&&6%3的值是()A-1B非零值C0D1

4、package foo;  import j

package foo; import java.util.Vector;private class MyVector extends Vector { int i = 1; public&en...

5、package foo;  public c

package foo; public class Outer { public static class Inner { } }  Which statement i...

6、package foo;  public c

package foo; public class Outer (  public static class Inner (  )  )  Which...