posted 18 years ago
Do you mean in Notepad there are no line breaks? Notepad being a Windows program it is probably looking for Windows linebreaks, which are "\r\n", not just "\n". There's also a system property called "line.separator" where this is stored.
Additional benefit of using the property instead of hard-coding the string is that you can move the program to a different platform, and it will then use the line terminator for that platform, instead of the Windows one.
[ August 04, 2005: Message edited by: Ulf Dittmer ]