Java Reference
In-Depth Information
Generating program documentation using Javadoc is a two-step process. First, you insert special
comments in the source code; then, you execute the Javadoc command to create HTML-formatted
program documentation.
This appendix illustrates how to use Javadoc to create HTML-formatted program documentation
based on comments inserted into Java source code. This appendix uses a sample file on the Data Disk to
illustrate this process; however, you can insert Javadoc comments into any existing Java source code file.
Starting TextPad and Opening an Existing File
The following steps open a program called Sample2.java, included on the Data Disk that
accompanies this topic. See the preface of this topic for instructions for downloading the Data Disk
or see your instructor for information about accessing the files required in this topic.
To Start TextPad and Open an Existing File
1. Click the Start button on the taskbar, point to All Programs, and then click TextPad on the All
Programs submenu.
2. When the TextPad window opens, if necessary, click the Close button in the Tip of the Day
window. Click the Open button on the TextPad toolbar.
3. When the Open dialog box is displayed, click the Look in box arrow and then click 3 1 2 Floppy
(A:) in the list.
4. Double-click the Appendices folder.
5. When the list of files displays, double-click the file Sample2.java. If necessary, click View on the
menu bar and then click Line Numbers to display line numbers.
TextPad displays the Java source code for the Sample2.java file in the coding window (Figure E-2).
coding window
displays source
code
file
name
TextPad
window
class
name
FIGURE E-2
Search WWH ::




Custom Search