How to get new line in Java Console or Windows Application

Waqas Anwar
06 June 2009
3424 Views

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");