javadoc specs - Javadoc specifications A programmer who...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Javadoc specifications A programmer who wants to use your program should be able to look at the specification of the program, its documentation, without having to look at the code itself. Java has a facility for extracting documentation from your program —provided that you have written your documentation appropriately. This requires placing javadoc comments before each class, field declaration, and method declaration. These comments have the form: /** . .. */ To show you how this works, look at class Elephant in DrJava. And here is the folder in which file Ele- phant.java appears. Notice that we have put an empty directory doc in it. We suggest you do this also. Now, return to the DrJava application, and click item Javadoc on the right of the tool bar at the top of the DrJava window. After waiting a while, a browser window will open, which contains the javadac spec in it, in the same format as the Java API specifications. Look at that! Now let’s look at the specification in detail.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/07/2008 for the course CS 101 taught by Professor Gries during the Spring '08 term at Cornell University (Engineering School).

Page1 / 2

javadoc specs - Javadoc specifications A programmer who...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online