OHHAI OHHAI - 5 months ago 10
Java Question

Easiest way to convert a List to a Set in Java

What is the easiest way to convert a

List
to a
Set
in Java?

Answer
Set<Foo> foo = new HashSet<Foo>(myList);
Comments