+ 1

System.out.print?

What’s the difference between “System.out.printIn()” and “System.out.print()”?

2nd Jan 2018, 9:05 AM
Dcm
3 Answers
+ 11
@RandomCoder actually Hi and Hello will be on the same line System.out.print does not move the cursor to a new line Hello will be printed on the same line as Hi, however System.out.println does move the cursor to a new line so any print statement after that will be on another line
2nd Jan 2018, 9:14 AM
David Akhihiero
David Akhihiero - avatar
+ 3
.println leaves a line after printing the text. .print does not leave a line after printing the text.
2nd Jan 2018, 9:17 AM
Karan Kumar
Karan Kumar - avatar
+ 2
@Yerucham Yes I tried now, you are right👍
2nd Jan 2018, 9:20 AM
Sad
Sad - avatar