0

]Anserd] New line \n

https://code.sololearn.com/cMO9TgASSJUw/?ref=app The symbol is recognized because no \n - s are seen in the output file. No new lines are created, though. What's the matter?

2nd Apr 2017, 11:49 AM
Alex Snaidars
Alex Snaidars - avatar
2 ответов
+ 12
Use \r\n instead of \n or use the value of System.getProperty("line.separator") for the line break. Different OS use different separators. The getProperty method gets the actual used line separator from the OS.
3rd Apr 2017, 5:19 AM
Tashi N
Tashi N - avatar
+ 2
Thanks. I've edited my code a little tiny bit.
3rd Apr 2017, 7:14 AM
Alex Snaidars
Alex Snaidars - avatar