map用法 keySet、entrySet、四种遍历 Map<String,String> map = new HashMap<>();map.put("1","hello");map.put("2","world");map.put("3","!");Set<String> set = map.keySet();Set<Map.Entry<String, String>> s = map.
public static void main(String[] args) {HashMap hashMap = new HashMap();hashMap.put("jack",650);hashMap.put("tom",1200);hashMap.put("smith",2900);System.out.println(hashMap);//将jack的工资更改为2600hashMa
public static void main(String[] args) {HashMap hashMap = new HashMap();hashMap.put("jack",650);hashMap.put("tom",1200);hashMap.put("smith",2900);System.out.println(hashMap);//将jack的工资更改为2600hashMa