It is represented by double forward slashes (//). It can be used before and after the statement.
Let’s see the example of single-line comment i.e. added before the statement.Test it Now
Let’s see the example of single-line comment i.e. added after the statement.Test it Now
It can be used to add single as well as multi line comments. So, it is more convenient.
It is represented by forward slash with asterisk then asterisk with forward slash. For example:
It can be used before, after and middle of the statement.Test it Now