Os:windows7 x64
Jdk:jdk-8u131-windows-x64
Ide:eclipse Oxygen Release (4.7.0)
referencelinking:http://blog.csdn.net/u010227447/article/details/41823839
Code
Package jizuiku0;/* * @version V17.09 */public class Sdemo {public static void main (string[] args) {//current system Windows7 X64STR ing key = "line.separator";//Res stores the newline character of the current system, string res = System.getproperty (key);//Why do you do it? Because it has different line breaks for different systems}}
Result
Just beginning to output the line break to the console, ready for the console to ... But there's nothing on the console ... Empty, boundless.
Then think about how to show the line break? Thought of the debug, so it was born.
Java is good, worth learning.
Learning resources: The reference link to the head of the blog + Pure Heart.
JavaSE8 base System.getproperty get line break for current system