SyntaxFix
Write A Post
Hire A Developer
Questions
Quite simple, just use the built-in function in Map.java as followed
Map.java
map.put(key, map.getOrDefault(key, 0) + 1);