I'm trying to read and write from a text file by using BufferReaderand BufferWriter. When it writing by write method, it writes withoutpassing line, I mean all the text file in the same line.
Well thats simple, just add the string "\n" at the end of ur string. But thereare also methods just like print and println, but i dont remember the name, youjust browse the api and use them...
Yes, the BufferedWriter would write in the same line unless and until you inserta separate line by the newLine() methodExample:tempWriter.write("This is a sample line");tempWriter.newLine();tempWriter.flush();Notes:- use flush() method if you want to force the writer to insert line immediately.- You can also use "\n" in the write method to insert line, but DON'T do this.This is not platform independent.