Q. What will be the output of the following code
Code:
import java.util.LinkedHashSet;
import java.util.Set;
public class LinkedHashSetTest {
public static void main (String args[])
{
Set s=new LinkedHashSet();
s.add(“1”);
s.add(1);
s.add(3);
s.add(2);
System.out.println(s);
}
}
β
Correct Answer: (C)
[1, 1, 3, 2]