试题详情
- 单项选择题 package foo; import java.util.Vector; private class MyVector extends Vector { int i = 1; public MyVector() { i = 2; } } public class MyNewVector extends MyVector { public MyNewVector() { i = 4; } public static void main(String args[]) { MyVector v = new MyNewVector(); } } 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.
- B
关注下方微信公众号,在线模考后查看
热门试题