I have a string that contains new lines. I send this string to a function to write the String to a text file as:
public static void writeResult(String wr
This approach always works for me:
String newLine = System.getProperty("line.separator"); String textInNewLine = "this is my first line " + newLine + "this is my second line ";