1 import java.util.HashMap; 2 import java.util.Iterator; 3 import java.util.Map; 4 import java.util.Set; 5 6 7 public class zengzhiwei { 8 public static void main(String agrs[]) { 9 System.out.println("hello world!"); 10 Map<String, String> m = new HashMap<String, String>(); 11 m.put("zengzhiwei", "zzw"); 12 m.put("zengzhijie", "zzj"); 13 14 Set<String> s = m.keySet(); 15 Iterator<String> itr = s.iterator(); 16 while(itr.hasNext()) { 17 Object o = itr.next(); 18 System.out.println(m.get(o)); 19 } 20 21 } 22 23 }