-->
当前位置:首页 > 题库

单选题:What will happen if you compile/run the following lines of code?

Luz5年前 (2021-05-10)题库1151
What will happen if you compile/run the following lines of code? @[A](2)
```Java
Vector a = new Vector();
a.addElement(10);
System.out.println(a.elementAt(0));
```

A. Prints 10.
B. Prints 11.
C. Compilation error at line 3.
D. Prints some garbage.



A.Prints 10.
B.Prints 11.
C.Compilation error at line 3.
D.Prints some garbage.


答案:A