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