How do I insert new line when writing to a txt file using java.nio.file ? The following code produces a txt file with one line ABCDEF, instead of two s
java.nio.file
ABCDEF
Complementing to @Tunaki, if you want two lines, only insert another line:
String test = "ABC" + System.lineSeparator() + System.lineSeparator() + "DEF";