Hi,
I have a somewhat abstract question, in that i dont have any code examples for what i am trying to do. Basically i want to write some code that will take a number of files, and compare them, picking out words that appear frequently in all the files. Now im relatively new to java and still trying to get my head around it, so what im looking for is a few pointers how to get started on this. Does anybody have any suggestions?
Thanks that seems to be exactly what im looking for. How would i write a simple main method to test that? For clarity, that being this code:
private static final String DELIM = ",";
/**
* Compile two files.
*
* @param file1 String the input file 1
* @param file2 String the input file 2
* @param file3 String the output file
* @throws IOException error in reading/writing
*/
public void compileFiles(String file1, String file2, String file3) throws
IOException {
BufferedReader reader1 = new BufferedReader(new InputStreamReader(
new FileInputStream(file1)));
BufferedReader reader2 = new BufferedReader(new InputStreamReader(
new FileInputStream(file2)));