|
|
// A single line comment is terminated by a newline
/* Comment that has special start and end markers */
/*
* These comments can extend
* to multiple lines
*/
/** */ marks the start and end of a special doc comment
/**
* This comment will get converted to HTML
* by the <b>javadoc</b> tool
*/
/**
* An example class comment
*
* @author John Lowry
* @see java.awt.Button
*/
class MyButton extends Button {
}
| Tag | Applies to | What it does | Usage example |
|---|---|---|---|
| @see classname | class, interface, method | Adds a hyperlinked See Also entry | @see java.lang.String |
| @deprecated text | class, interface, method | Adds a comment that this API should not longer be used | @deprecated Replaced by setBounds(int, int, int) |
| @param name description | method | Documents a parameter | @param index The index of the desired character |
| @return description | method | Adds a description of the return value | @return The desired character |
ExerciseLook at the javadoc home page. What other tags are available besides those listed above? |
|
|
Dan Keller Technical Services 4500 19th St., San Francisco California, USA 94114 tel: 415 / 861-4500 |