What is the easiest way to convert a List
to a Set
in Java?
17 s
Set<Foo> foo = new HashSet<Foo>(myList);
What is the easiest way to convert a List
to a Set
in Java?
Set<Foo> foo = new HashSet<Foo>(myList);