for each + map.keySet();
Set<Integer> set = map.keySet();
for (Integer key : set) {
System.out.println("key:" + key + ", value:" + map.get(key));
}
for each + map.keySet();
Set<Integer> set = map.keySet();
for (Integer key : set) {
System.out.println("key:" + key + ", value:" + map.get(key));
}