题解 | #map简单应用#
map简单应用
http://www.nowcoder.com/practice/7a47e465315c40848d5daba676f9ac29
//write your code here...... for (Map.Entry<Integer, String> entry : map.entrySet()) { System.out.println(entry.getKey() + ":" + entry.getValue()); } System.out.println(); map.put(5,name); map.remove(4); map.replace(3,"Tommy"); for (Map.Entry<Integer, String> entry : map.entrySet()) { System.out.println(entry.getKey() + ":" + entry.getValue()); }