📅  最后修改于: 2022-03-11 14:52:19.784000             🧑  作者: Mango
public void iterateUsingIteratorAndEntry(Map map) {
Iterator> iterator = map.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry entry = iterator.next();
System.out.println(entry.getKey() + ":" + entry.getValue());
}
}