package map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
/**
* @auto dh
* @create 2020-04-30-16:57
*/
public class HashMap001 {
public static void main(String[] args) {
Map<String,Integer> map=new HashMap<>();
map.put("zhangsan",20);
map.put("lisi",23);
map.put("wangwu",32);
Set<Map.Entry<String,Integer>> entry=map.entrySet();
Iterator<Map.Entry<String,Integer>> iterator=entry.iterator();
while(iterator.hasNext()){
Map.Entry<String,Integer> map1=iterator.next();
System.out.println(map1.getKey()+":"+map1.getValue());
}
}
}