There are _____ types of Comments in Java

A) One
B) Two
C) Three
D) Four
Explanation: There are 3 types of comments namely Single-line, Multi-line and Documentation comment

Showing Answers 1 - 22 of 22 Answers

Satishjava

  • Feb 18th, 2006
 

Only Two types

                Single line        //..........

              and multiple line /*........*/

  Was this answer useful?  Yes

mavrick_joe

  • Apr 19th, 2006
 

There are only two types of comments .... // single line /* .....Multi-line */ and multiline comment can be used for documentation type too .../**whatever */So, there's only two types of comment styles

  Was this answer useful?  Yes

bhavana

  • Dec 27th, 2012
 

4

  Was this answer useful?  Yes

Ernie B

  • Sep 27th, 2017
 

I would answer 2 depending on what you mean by "type of Comments..". This question can potentially be answered as follows:
Documentation Comment
* uses multi-line style
Implementation Comment
* uses traditional style (end of line or single line)

  Was this answer useful?  Yes

A P Chavan

  • Dec 4th, 2017
 

Three types of comments :
Comment type | Used as
1. Single-line //
Info :=>The compiler ignores everything from // to the end of the line.
2. Multi-line /* statements; */
Info :=>The compiler ignores everything from /* to */.
3. Document-type /** document */
(doc comment)
Info :=>The JDK javadoc tool uses doc comments when preparing automatically generated documentation.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions