How to get new line in Java Console or Windows Application


If you are creating java console or windows based application and you need to display new line you can use getProperty static method of System class.

String newline = System.getProperty("line.separator");

 

 

About author


User avatar

Waqas Anwar

Founder of EzzyLearning.com, Senior Consultant, Microsoft .NET and Web Technologies

Comments