/string-to-map

Parse String and add it to Map

Primary LanguageJava

String to Map

Parse text from file "TextForParsing.txt", count words and add them to Map<String, Integer>.
Key - word from text file.

Value - number of word repeating.

Output:

  • boo - 5
  • doo - 1
  • too - 4
  • foo - 2
  • hoo - 3
  • moo - 3
  • loo - 2