0
What is the difference between System.out.println and System.out.print?
3 Respuestas
+ 6
println also add newline so the next output will be on the line below
print stays on same line
+ 2
println means print line
Both of there produce the same result EXCEPT the fact that print line will leave a line after writing the sentence which means that next sentence will be printed in the next line.
hence println is used to boost readability of your code
Hope that helps.
Doubts? msg me
+ 1
println moves input at a new line after withdrawal, print doesn't