.

Java Tutorial: Java Documentation Comments

Documentation

Java supports three kinds of comments. It is list as follows

  • {`/* comment */ - multi line comment`}
  • {`// comment - one line comment`}
  • {`/ ** document comment */ - doc comment`}

The commenting style /* comment */ ignores the content from /* to */

The commenting style // comment ignores the content from // to the end of the line

/ ** document comment */

The above commenting style is a comment of documentation

It is also termed as doc comment

The tool of javadoc which belongs to JDK employs it while organizing mechanically routine produced documentation

Javadoc

  • It is a tool which arrives from JDK
  • It is employed for preparing Java program documentation in a html formatting
  • The java code needs pre described documentation format

Example

The underlying example show the usage of documentation comment

documentation img1 documentation img2
.