JavaSE8 base System.getproperty get line break for current system

Source: Internet
Author: User



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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.