java how to increment hashmap /map value

www.‮tual‬turi.com
java how to increment hashmap /map value
int count = map.containsKey(word) ? map.get(word) : 0;
map.put(word, count + 1);
Created Time:2017-08-31 06:10:52  Author:lautturi