/**
This is a Javadoc comment block for whatever immediately follows.
*/
/**
* You will find some examples with a * at the beginning of each line.
* These *s are optional and not required.
*/
<
, >
, and &
, for <, >, and &, respectively (and other similar items).<a>
for hyperlinks, <em>
for italics/emphasis, <strong>
for bold/strong, and <u>
for underlined.import java.util.*;
/**
This sentence should describe the purpose of the Foo class.
@author Gish, Joe
*/
public class Foo{
...
}
javadoc -d doc -Xdoclint:all -link https://docs.oracle.com/en/java/javase/11/docs/api *.java
The -d option creates a directory named doc with the generated HTML files.
The -Xdoclint:all option ensures that javadoc errors and warnings are output to the user.
The -link option creates hyperlinks in the generated HTML files to the Java API documentation.
If you need inspiration or examples for what to say in your comments, you are encouraged to look up the Javadoc for any of the standard Java classes that we’ve been using all semester.
For example, see the link to the String class: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html
https://docs.oracle.com/javase/1.5.0/docs/guide/javadoc/index.html
https://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javadoc.html
http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#styleguide