0

why java automatically adds line break in output without any code?

can anyone explain this or this just in this code playground?

13th Mar 2017, 2:15 PM
Mustufa Bahelim
Mustufa Bahelim - avatar
2 Réponses
+ 7
use System.out.print("lalala yadayada"); intstead of System.out.println("lalala yadayada");
13th Mar 2017, 2:31 PM
Burey
Burey - avatar
+ 7
It doesn't,if you use System.out.print("blablah"); it'll print whatever is in the print command and stop. If you use System.out.println("blablah"); it'll print whatever is in the println command, change line and then stop. That's the difference of the two commands print and println.
13th Mar 2017, 2:38 PM
Haris
Haris - avatar