//遍历MAP方法,效率较低
Iterator it = map.keySet().iterator();
while(it.hasNext()){
String key = (String) it.next();
String value = map.get(key);
System.out.println(key + "→" + value);
}
时间: 2025-01-04 08:18:25
//遍历MAP方法,效率较低
Iterator it = map.keySet().iterator();
while(it.hasNext()){
String key = (String) it.next();
String value = map.get(key);
System.out.println(key + "→" + value);
}