When I open the newly written file in jGRASP, it contains many lines of text. When I open the same text file in notepad, it contains one line of text with the same data. The transFile is just a variable for the name of the text file that I am making.
FileWriter f = new FileWriter(transFile, true);
BufferedWriter out = new BufferedWriter(f);
out.write(someOutput + "\n");
out.close();
f.close();
I have changed the code to the following and it fixed the problem in notepad.
out.write(someOutput + "\r\n");
Why does this happen?
\r\nfor EOL?\n