I have a Stream<String> of a file, now i want to combine equal words into a Map<String, Integer> which counts, how often the word is in the Stream<String>.
I know that I have to use collect(Collectors.groupingBy(..)), but i do not know how to use it.
It would be very nice, if there is somebody who can provide some hints how to solve this problem!