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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.