‫Welcome back.
‫Before we start typing any Java codes, I should mention a very important topic, which is the comments.
‫In Java, comments are used to write notes or explanations within your code.
‫Comments are not executed as part of the program, but are instead intended for developers to read and
‫understand the code better.
‫In the previous lesson we wrote this line of code, but if we run the program, this line will not be
‫executed because it's a type of comments and it's single line comments because start with these two
‫forward slashes.
‫Comments in general, help improve code readability and make it easier for others, including yourself,
‫to understand your code later on.
‫There are two types of comments in Java, the single line comments and multi-line line comments.
‫The single line comment.
‫This is like this.
‫To add a single line comment, you can use two forward slashes at the beginning of the line and anything
‫written after the slashes are going to be ignored by the compiler.
‫Here's an example.
‫For example, this line right here, your code.
‫If we run the program, it will not be executed.
‫The multi line comments.
‫Multi line comments also known as block comments are used when you want to write comments that span
‫multiple multiple lines.
‫To create a multi-line comment, you enclose the comment between the forward slash and the forward slash
‫with the asterisk.
‫So for example, here we start with the forward slash and this asterisk and another asterisk and this
‫forward slash.
‫Then between these two lines, I'll include the comments, the multi-line comments.
‫Hello, my friends.
‫All these lines are not being executed.
‫They are ignored.
‫Okay.
‫This is the multi-line comment and this is the single line comments.
‫So comments will help you to explain complex logic documenting code functionality, providing instructions
‫to other developers or temporarily disabling portions of the code for testing purposes.
‫Later on, we'll see these comments a lot in our projects.