Comment is basically used when we do not want to execute the statement.
Type of Java comments
There are mainly two type of java comment.
- Single Line comment.
- Multi Line comment.
Single line comment  :-
The single line comment Is used for comment only one line.
Syntax:-
// this is single line comment (‘//’)
Example:-
public static void main(String[] args) {
System.out.println(“programmer coding”); //our first program
}
Â
out put:-
             programmer coding
Multiline comment
Multi line comment is used to comment multiple line at a time.
Syntax:-
/* this is multi
line comment */
Example:-
public static void main(String[] args) {
System.out.println(“programmer coding”); /*this is our
first
program*/