Advertisements
Advertisements
Question
Differentiate between the output statements System.out.print() and System.out.println().
Distinguish Between
Solution
System.out.print() | System.out.println() |
Using System.out.print() leaves the cursor on the same line on the screen. | System.out.println() moves the cursor to the following line of the screen after printing the result. |
shaalaa.com
Is there an error in this question or solution?
Chapter 1.05: Introduction to Java - EXERCISES [Page 54]