Q135
What will be the output of the following Java code? import java.util.*; class vector public static void main(String args[]) Vector obj = new Vector(4,2); obj.addElement(new Integer(3)); obj.addElement(new Integer(2)); obj.addElement(new Integer(5)); System.out.println(obj.capacity());
A.
2
B.
3
C.
4
AnswerD.
6
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board