1Set<String> set = new HashSet<String>;
2
3Iterator<String> iterator = set.iterator();
4
5while(iterator.hasNext()){
6 String aString = iterator.next();
7}
8
1Set<String> set = new HashSet<String>;
2
3for(String aString : set) {
4 System.out.println(aString);
5}
6