See on the CSDN, because use Java to write to Notepad on the line problem, see this article, reprinted a bit. Oh.
I hope you can see it later.
Today, I did a Java file read and write, the original thought will be Java database OK, but now a look, read and write files, threads and other issues are all very important AH. Oh, good to cut to the chase, today's problem is when I write to a notepad input stream, when all finished, open Notepad a look, inside all is the secret of the text, there is no line, and then I write a sentence plus a "/n", but then open Notepad found that any change in the output "n" Places have become, But when I open the world, or WordPad, or even Dreamweaver 8, there's a new line, what's going on here. Is it a coding problem ... Right, this is the problem, I checked the data, found Notepad line symbol is "/r/n". Hehe, plus after the problem all resolved, in fact, this is not a big problem, but I still want to send out, convenient for others is convenient for themselves, because I also find information on the Internet, if no one posted words I will not so quickly solve this problem, so here also have to thank the unknown recognition.
Again, the line in Notepad is "/r/n".
If you want to do cross-platform use, you may need to use
String str= system.getproperty ("Line.separator");
To get line breaks.
Linux uses/n
Windows uses/r/n
Other operating systems may also be different. Thanks to Weacer here, the back is what he raised, just here I wrote it