Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < listSize; i++) {
- if (!totalWords.containsKey(words.get(i))) {
- totalWords.put(words.get(i), 1);
- } else {
- Integer count = totalWords.get(words.get(i));
- totalWords.replace(words.get(i), count + 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement