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