Question: Java: Create a multithreaded program that reads all text files in a directory given by the user and creates a single output text file that

Java: Create a multithreaded program that reads all text files in a directory given by the user and creates a single output text file that counts the frequency of words found in all text files, combined. Ignore punctuation and symbols. Only words should be counted.

example: suppose in a /textfiles directory, there exists:

input1.txt : "hello world"

input2.txt : "hello everyone"

input3.txt: "This is world for everyone"

input4.txt: "We are the world"

----------------------------------------------------------------------

Then either in the same directory or in a different directory, an output.txt file must contain:

hello: 2

world: 3

everyone: 2

is: 1

for: 1

this: 1

are: 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!