java file operations
Posted on 2011-04-23
I am working on basic java functions programs.
Basically I have 10 files with some text.
1)I want to Read from 10 files(example: Read file1, Read file2...) and write the out put in a single file(write file).
2) the program should read a line from : Read file1 and than writeto the file and Remove that file from that file.
3) once the program is executed all the ReadFiles should have 0 lines ( all the lines must be deleted)
and all the data should be in one file.
I tried using these but having issues in writing to the file.
BufferedReader in = new BufferedReader(new FileReader("test.txt"));
BufferedWriter out = new BufferedWriter(new FileWriter("output.txt"));
str = in.readLine()