Q140
What will be the output of the following Java program? import java.util.*; class Output public static void main(String args[]) ArrayList obj = new ArrayList(); obj.add("A"); obj.ensureCapacity(3); System.out.println(obj.size());
A.
1
AnswerB.
2
C.
3
D.
4
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board