How to count words in java

后端 未结 6 1696
心在旅途
心在旅途 2020-12-06 21:00

I am looking for an algorithm, hint or any source code that can solve my following problem.

I have a folder it contains many text files. I read them and store all te

6条回答
  •  一向
    一向 (楼主)
    2020-12-06 21:42

    HashMap mapping Strings to Integers. Integers are a immutable so there is a bit of hustle to "increment" but not too much. You can override the put() method do that.

提交回复
热议问题