I have to read 20 odd compartively big files (mostly txt or pdf in some cases) and then perform some text processing on them .
I am using a BufferedReader and a loop to read these files , is there an effective way to do this ?
My problem : Read the contents of these files and seperate them into tokens and then store them in a data structure . I am using an array now , but i would like to make use of an efficient structure .
Can somebody suggest a means to solve both these problems
Since you are counting the frequency of each word you should use a list then iterate through the list and use a map with the key being the word to keep track of the number of occurences