OHHAI OHHAI - 1 year ago 79
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 Source
Set<Foo> foo = new HashSet<Foo>(myList);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download