java – BufferedWriter is not writing a new line in a file for a String having n added to it

java – BufferedWriter is not writing a new line in a file for a String having n added to it

Use instead BufferedWriter.newLine() which:

Writes a line separator. The line separator string is defined by the system property line.separator, and is not necessarily a single newline (n) character.

java – BufferedWriter is not writing a new line in a file for a String having n added to it

Leave a Reply

Your email address will not be published.