Java - Comments / Annotations

> Procedural Languages > Java

1 - About

Comments and annotations are ignored by the compiler but are useful to other programmers.

Advertising

3 - Comments

The Java programming language supports three kinds of comments.

3.1 - Type of comments

3.1.1 - /* text */

The compiler ignores everything from /* to */.

3.1.2 - /** documentation */

This indicates a documentation comment (doc comment, for short). The compiler ignores this kind of comment, just like it ignores comments that use /* and */. The javadoc tool uses doc comments when preparing automatically generated documentation. For more information on javadoc, see the JavadocTM tool documentation .

3.1.3 - // text

The compiler ignores everything from // to the end of the line.

4 - Documentation / Reference

lang/java/comment.txt · Last modified: 2017/02/12 21:05 by gerardnico