Creating API Documentation in java
API Documentation for Web browser
The javadoc tool provides an easy way to write API documentation for source code and software projects using the Java programming language. The javadoc documentation comments are the industry standard way of documenting source code. IDEs such as Eclipse and Netbeans can automatically generate the HTML documentation for the classes, interfaces, fields, constructors and methods implemented.
The Doc Comment
A doc comment in a .java file must be written before a class, field, constructor or method declaration. The doc comment comprises of a slash, followed by two asterisks, i.e., “/**”. Each following line begins with an asterisk, and the last line has one asterisk followed by a slash (“*/”).
In the enclosing body of the doc comment, there can be a description, as well as various tags followed by their separate descriptions.
These can be seen in the following example of a doc comment:
In this example the constructor of a Student class is being documented using the javadoc convention. There are five parameter tags that help describe the parameters being passed to the constructor of the Student class.
Further information on the javadoc convention as well as the various tags available can be viewed online at: