In the previous example, we’ve already seen comments. Comments are part of the code that’ll be ignored by the compiler.

a = 0;
b = 0; // error

Whereas the // represents a comment insertion, and all the text after the //, until the end of the line, is a comment. It is possible to comment multiple lines at once, and comments can be nested.

/* this is a /* nested
comment */
that ends here */

So everything inside a /* */ block becomes a comment.