Collections and Generics

© examsiri.com
Question : 2 of 53
 
Marks: +1, -0
1. import java util.*;
2. public class TestSet {
3.   enum Example { ONE, TWO, THREE }
4.   public static void main (String[] args) {
5.    Collection coll = new ArrayList ();
6.    coll.add(Example.THREE);
7.    coll.add(Example.THREE);
8.    coll.add(Example.THREE);
9.    coll.add(Example.TWO);
10.    coll.add(Example.TWO);
11.    coll.add(Example.ONE);
12.    Set set = new HashSet(coll);
13.   }
14. }

Which statement is true about the set variable on line 12?
Go to Question: