7.7. Javadoc

The javadoc program is distributed with Sun's JDK and by most third-party vendors. The command-line program uses comments enclosed between /** and */ to generate on-line documentation that includes hypertext links to other user-defined and system classes. You generally place javadoc comments above the class definition and before every nonprivate method and class. The first sentence of the variable or method description is placed in the alphabetized index at the top of the resultant page, with the full description available in the detailed sections at the bottom. To create the documentation, supply one or more file or package names to javadoc, as follows:

 javadoc Foo.java javadoc Foo.java Bar.java javadoc graphics.newWidgets javadoc ...

Get Core Web Programming, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.