how to convert list string to set string in java code example Example: java list to set Set<Foo> foo = new HashSet<Foo>(myList);