Java Reference
In-Depth Information
Coding Doc Comments
As previously noted, doc comments should be placed directly above a definition for a class, an
interface, a constructor, or a method. The following steps show how to code doc comments for the
SampleJavadoc class and the main() method.
To Code Doc Comments
1. Enter lines 11 through 15 from Figure E-4 on page E.05 into the SampleJavadoc.java coding
window.
TextPad displays the doc comments for the SampleJavadoc class in the coding window (Figure E-6).
description
@author tag
new JAVADOC
comment
@see tag
SampleJavadoc
class header
HTML HREF tag
adds link to
Web site
FIGURE E-6
2. Enter lines 18 through 24 from Figure E-5 on the previous page into the SampleJavadoc.java
coding window.
TextPad displays the doc comments for the main() method in the coding window (Figure E-7).
 
Search WWH ::




Custom Search