Comment to the end of the line - // comment

After // until the end of the line, the expression is considered a comment.

Example:

int i = 0;  // here we declare a variable - an integer and assign it the value 0


Comment on several lines /* comment */

The message text between the notation /* and */ regardless of the number of lines is considered a comment.

Example:


/*If you need to write a long explanation on several lines in the program text

or comment out a fragment of the program,

it is convenient to do so*/