Does java allows multiline comments

Does java allows multiline comments

Does java allows multiline comments

Java comments are statements that are not executed by the compiler and interpreter. Comments are used to provide information or explanation about a variable, method, class or any statement.

Types of Java Comments

Single Line Comment

Multi Line Comment

Documentation Comment

Single Line Comment

Single line comment is used to comment on only one line.

//This is single line comment

Multi Line Comment

Multi line comment is used to comment on multiple lines of code.

/*
This
is
multi line
comment
*/

Documentation Comment

Documentation comment is used to create documentation comment. To build the Documentation API, you need to use the javadoc tool.

/**
This
is
documentation
comment
*/

Also check this:-

codechef problems:-

 

 

Wipro :-

 

 

Infytq :-

 

 

Key Points;-

Hackerrank:-

C-tutorial:-

 

See more:-

Leave a Reply

Your email address will not be published.