+ 1
Can you help me to write a java program to find the duplicate words and their number of occurrences in a string?
4 ответов
+ 2
I also wanna know this....
0
what is hashmap.. ? is any other method available?
0
hashmaps are explained in the java course.
you can also split the string into words and simply interate over your other words and save the number somewhere
- 1
split the strings into the words, interate over the words and put them in a hashmap, the word is the key, increase the value by one when same word occures. done