HashMap<String,Integer> hm = new HashMap<String,Integer>();//泛型的综合案例
hm.put("jjj",21);//插入数据
hm.put("asdf",26);
Set<Map.Entry<String,Interger>> entrySet = hm.entrySet();//hm.entrySet()的重要作用是什么呀?
for(Map.Entry<String,Integer> entry : entrySet){
System.out.println(entry.getKey() + ":" + entry.getValue();
}// |
|