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!


Associated Course: The Complete Java Development Bootcamp
Related Course: The Complete Spring Boot Development Bootcamp – Become a Java Web Developer

Feedback Summary
4.7
43 students
5

91%
4

2%
3

0%
2

0%
1

7%
Written Reviews
There are no written reviews yet.