0

What is the difference between System.out.println and System.out.print?

28th Feb 2017, 4:53 PM
Sagar Kakade
3 odpowiedzi
+ 6
println also add newline so the next output will be on the line below print stays on same line
28th Feb 2017, 4:59 PM
Burey
Burey - avatar
+ 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
28th Feb 2017, 5:00 PM
Meharban Singh
Meharban Singh - avatar
+ 1
println moves input at a new line after withdrawal, print doesn't
28th Feb 2017, 4:59 PM
Serge Rola
Serge Rola - avatar