\n
is a newline character.You can use this special character to insert a line break inside Java strings.
For example this:
System.out.println("first line\nsecond line\n\nthird line");
Will print:
first line
second line
third line
\n
is a newline character.You can use this special character to insert a line break inside Java strings.
For example this:
System.out.println("first line\nsecond line\n\nthird line");
Will print:
first line
second line
third line