Table of Contents

Java - Comments / Annotations

About

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

Comments

The Java programming language supports three kinds of comments.

Type of comments

/* text */

The compiler ignores everything from /* to */.

/** 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 .

text === The compiler ignores everything from // to the end of the line. ===== Documentation / Reference ===== * Lesson: A Closer Look at the “Hello World!” Application * Annotations