Question: JAVA: create a program that reads all text files in a directory, calculates the occurrences of words, and saves the result in one single output
JAVA: create a program that reads all text files in a directory, calculates the occurrences of words, and saves the result in one single output text file.
assume that you are in a directory called Desktop/programdirectory, where you have multiple text files.
textfile1.txt : "how are you"
textfile2.txt: "great thank you"
textfile3.txt: "great to see you. see you later"
Then, your output.txt should have:
how: 1
are: 1
you: 4
great: 2
thank: 1
to: 1
see: 2
later: 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
