Set<String> set = new HashSet<String>(); for (String s : set) { System.out.println(s); } //Java 8: set.forEach(System.out::println);