System.getProperty("line.separator")
returns the OS dependent line separator.
On Windows it returns "
"
, on Unix "
"
. So if you want to generate a file with line endings for the current operating systems use System.getProperty("line.separator")
or write using a PrintWriter
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…