void (String[] args) { Map<String, String> vals = new HashMap<>(); vals.put("foo", "bar"); String defaultValue = "42"; for<caret> (Entry entry : vals.entrySet()) { vals.put(entry.getKey(), defaultValue); } }