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
PrintWriter out = null; // for writting in file String newLine = System.getProperty("line.separator"); // taking new line out.print("1st Line"+newLine); // print with new line out.print("2n Line"+newLine); // print with new line out.close();