Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

update value in hashmap java

map.replace(key, map.get(key) + 1);
//or
map.put(key, map.get(key) + 1);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #update #hashmap #java
ADD COMMENT
Topic
Name
2+5 =