Seven
/*有一个Map集合里面存储的是学生的姓名和年龄,内容如下{张三丰=21, 灭绝师太=38, 柳岩=28, 刘德华=40, 老鬼=36, 王二麻子=38}a.将里面的元素用两种遍历方式打印到控制台上b.将老鬼的年龄改成66c.将年龄大于24的学生姓名,存入到项目下的 temp\\student.txt中 */public class Seven { public static void main(String[] args) throws IOException { //创建hashMap集合 HashMap<String,Integer> hm = new HashMap<>(); hm.put("张无忌",21); hm.put("赵敏", 20); hm.put("周芷若", 19); hm.put("柳岩", 28); hm.put("刘德华", 40); hm.put("金毛狮王", 48); hm.put("老鬼",36); hm.put("王二麻子",38); //遍历方式1: Set<Map.Entry<String, Integer>> entries = hm.entrySet(); for (Map.Entry<String, Integer> entry : entries) { String key = entry.getKey(); Integer