- /**
- * 最常见也是大多数情况下用的最多的,一般在键值对都需要使用
- */
- Map
map = new HashMap(); - map.put("熊大", "棕色");
- map.put("熊二", "黄色");
- for(Map.Entry
entry : map.entrySet()){ - String mapKey = entry.getKey();
- String mapValue = entry.getValue();
- System.out.println(mapKey+":"+mapValue);
- }
- 9
-----待拓展