Java Reference
In-Depth Information
Appendix B
Using Java's Documentation Comments
A
s explained in
Chapter 1
, Java supports three types of comments. The first two are the
//
and the
/* */
. The third type is called a
documentation comment
. It begins with the character
sequence
/**
. It ends with
*/
. Documentation comments allow you to embed information
about your program into the program itself. You can then use the
javadoc
utility program
(supplied with the JDK) to extract the information and put it into an HTML file. Document-
ation comments make it convenient to document your programs. You have almost certainly
seen documentation generated with
javadoc
, because that is the way the Java API library
was documented.
The javadoc Tags
The
javadoc
utility recognizes the following tags:
Tag
Meaning
@author
Identifies the author.