单选题:What will happen if you compile/run the following lines of code?
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
```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