Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. for (int i = 0; i < listSize; i++) {
  2. if (!totalWords.containsKey(words.get(i))) {
  3. totalWords.put(words.get(i), 1);
  4. } else {
  5. Integer count = totalWords.get(words.get(i));
  6. totalWords.replace(words.get(i), count + 1);
  7. }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement