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(); } } 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.
正确答案:B
答案解析:有
微信扫一扫手机做题