「Java」keySet()と entrySet()でMapの中身を全て取得する方法
//keySet()
Set<String> set = map.keySet();
for (String s:set) {
System.out.println(s+","+map.get(s));
}
//entrySet()
Set<Map.Entry<String, String>> entryseSet=map.entrySet();
for (Map.Entry<String, String> entry:entryseSet) {
System.out.println(entry.getKey()+","+entry.getValue());
}