write java 8 new line code example
Example 1: java filewriter new line
fileWriter.write(System.lineSeparator());
Example 2: java new line
String line1 = "Humpty Dumpty sat on a wall.";
String line2 = "Humpty Dumpty had a great fall.";
String rhyme = line1 + "\n" + line2;