can we update values of hashmap using for loop code example
Example: update hashmap value while iterating
for (Map.Entry entry : playerCooldowns.entrySet()) {
entry.setValue(entry.getValue() - 20);
}
for (Map.Entry entry : playerCooldowns.entrySet()) {
entry.setValue(entry.getValue() - 20);
}