Commenting in Java Code

In this lesson, we will learn how to add comments in Java code and why they are important.

In an earlier lesson, we saw the following code draw a smiley face on the screen. The same code is shown in the code widget below. Just by looking at the code, you may not know how this code is drawing the smiley face, or whether it is drawing it at all.

Get hands-on with 1200+ tech skills courses.