// 1.keySet 遍历
Map<String, String> map = new HashMap<String, String>();
map.put("1", "11");
map.put("2", "22");
map.put("3", "33");
map.put("4", "44");
Set<String> entrySet = map.keySet();
for (String key : entrySet) {
System.out.println(map.get(key));
}
// 2.entrySet
Set<Map.Entry<String, String>> entrys = map.entrySet();
for (Map.Entry<String, String> set : entrys) {
System.out.println(set.getKey() + "-----" + set.getValue());
}
//3.前两种方法也可以直接用迭代 器