In java, write a class that reads a file and outputs a list of the unique words in the file and the number of times each unique word occurs.
Hint: use a HashMap with keys being the words and values being integer counts associated with the words.
Then, modify your program from to print the list of words and their counts out to another file.