This code:
PrintWriter output = new PrintWriter(new FileWriter(outputFile, false));
output.println("something\n");
output.println("something else\n");
Outputs:
something
something else
Instead of:
something
something else
I tried using “\r\n” instead of just “\n” but it just doesn’t work like how I want it to. How do I fix this?
P.S. I’m using windows 7
Your code works like a charm, just check the file with a proper programmers editor.
(or as I suggested before, take a look at an hex dump of the file)