Kizspy Question: 42
(Choose 1 answer)
FJOVERFLOW.COM
What is the output of the following code snippet?
Set<Integer> set1 = new TreeSet();
set1.add(1); set1.add(3); set1.add(2); set1.add(1);
System.out.println(set1);
A. [1,2,3]
B. [1,1,2,3]
C. [1,3,2]
D. [1,3,2,1]