void (Map<String, Integer> map) { for (Map.Entry<String, Integer> entry : map.entrySet()) { String str = entry.getKey(); Integer num = entry.getValue(); System.out.println(str + ":" + entry.getValue()); entry.setValue(1); } }