+ 8

New line in java

how can i use new line in java except system.out.println command.. like we have endl in c++

8th Feb 2017, 6:53 AM
adeel salim
adeel salim - avatar
2 Antworten
+ 5
\n or you direct use System.out.println(); which can directly Print Next string in in next line
8th Feb 2017, 7:02 AM
Shreyance Gupta
Shreyance Gupta - avatar
+ 2
You can use: System.out.print("\n"); Where "\n" represents a line break.
8th Feb 2017, 6:59 AM
WALL_BUILDER
WALL_BUILDER - avatar