Javadoc


Javadoc is an API documentation generator for the Java programming language. Based on information in Java source code, Javadoc generates documentation formatted as HTML and other formats via extensions. Javadoc was created by Sun Microsystems and is owned by Oracle today.
The content and formatting of a resulting document are controlled via special markup in source code comments. As this markup is de facto standard and ubiquitous for documenting Java code, many IDEs extract and display the Javadoc information while viewing the source code, often via hover over an associated symbol. Some IDEs, like IntelliJ IDEA, NetBeans and Eclipse, support generating Javadoc template comment blocks. The @tag syntax of Javadoc markup has been re-used by other documentation generators, including Doxygen, JSDoc, and HeaderDoc.
Javadoc supports extension via doclets and taglets, which allow for generating different output formats and for static analysis of a codebase. For example, JDiff reports changes between two versions of an API.
Although some criticize Javadoc and API document generators in general, one motivation for creating Javadoc was that more traditional API documentation is often out-of-date or does not exist due to business constraints such as limited availability of technical writers.
Javadoc has been part of Java since its first release, and is often updated with each release of the Java Development Kit.
Javadoc and the source code comments used by Javadoc, do not affect the performance of a Java executable since comments are ignored by the compiler.

Markup

Javadoc ignores comments unless they are specially marked. A Javadoc comment is marked with an extra asterisk after the start of a multi-line comment: /**. Following lines are presceded with an *, and the entire comment block should be terminated with a */.
An example of a method Javadoc comment follows:

/**
* Description of what the method does.
*
* @param input Description of parameter.
* @return Description of return value.
* @throws Exception Description of exception.
*/
public int methodName throws Exception

Some HTML tags, such as

, , and