Home Using printlns

Printing and newlines

If you want to print a newline, always do System.out.println() instead of System.out.print("\n") or System.out.println(""). With a few rare exceptions, avoid using the \n or \r newline escape characters.