使用迭代器Iterator遍历Map_方式2 public static void TestItratorMap() { Map<Integer,String> map1 = new HashMap(); map1.put(1001, "希维尔"); map1.put(1002, "安妮"