Map.Entry 遍历
for(Map.Entry<String, String> entry:map.entrySet()){
//todo
}
迭代器迭代Iterator
Set set = map.entrySet();
Iterator i = set.iterator();
while(i.hasNext()){
Map.Entry<String, String> entry1=(Map.Entry<String, String>)i.next();
//todo
}
用keySet()迭代
Iterator it=map.keySet().iterator();
while(it.hasNext()){
//todo
}
用entrySet()迭代
Iterator it=map.entrySet().iterator();
while(it.hasNext()){
Map.Entry entry = (Map.Entry)it.next();
//todo
}