i have a for each loop for file array. For each file there are certain operations performed which are common. There are lot of such files to be processed and its time consuming. I was thinking if java threads can help me achieve higher performance. I am new to java thread programming. Any help needed
Share
suppose FileReader Class contains the logic for processing a single File
Then add the following code to process the files in a directory
You should always use a thread pool to make sure you use the system resources elegantly
for each file you want to process