获取map集合中键和值的三种方式 //创建一个map集合 HashMap<String, Integer> map = new HashMap<>(); //添加元素 map.put("小王",25 ...