Javadoc is a
really useful tool supplied with Sun's
Java Development Kit.
It provides a very easy way of making the (
very dull) task of documenting your
Java code slightly easier. Any
class or
method can have a special
/** */ comment before it. Then the javadoc tool is run against the commented source code.
API documentation (complete with class hierarchy and method index) are created in
HTML.
/** Adds two numbers together.
* @param first the first number to add.
* @param second the second number to add.
* @return the sum of the two integers
*/
public int addNumbers(int first, int second)
{
return first + second;
}
Other flags you can use include:
- @see
- @version
- @author
- @exception
- @deprecated
Some people like the javadoc supplied with
JDK1.2 because is generates the
documentation using
frames (plus it's all
blue and
pretty too). Others prefer the more simple output from the
JDK1.1 version.
See http://java.sun.com/products/jdk/javadoc/ for more info.