Java Bootcamp – Workbooks and Challenges
)}

print vs. println

Before you continue, you need to understand the difference between print and println.

  • println() prints text and moves to a new line.
System.out.println(" a "); System.out.println(" b "); System.out.println(" c ");

>> a

>> b

>> c

  • print prints text but it does not move to a new line. So, ensuing print calls print on the same line.
System.out.print(" a "); System.out.print(" b "); System.out.print(" c ");

>> a b c

You can proceed to Workbook 5.3.

See you there!


Feedback Summary
4.8
38 students
5

92%
4

3%
3

0%
2

0%
1

5%
Written Reviews
There are no written reviews yet.