and /
, and the @param Javadoc tag (an @-prefixed instruction).
The following list identifies several commonly used tags:
@author identifies the source code's author.
@deprecated identifies a source code entity that should no longer be used.
@param identifies one of a method's parameters.
@see provides a see-also reference.
@since identifies the software release where the entity first originated.
@return identifies the kind of value that the method returns.
The following code has more documentation comments
/**
* A simple class for introducing a Java application.
*
* @author yourName
*/
public class HelloWorld {
/**
* Application entry point
*
* @param args
* array of command-line arguments passed to this method
*/
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
We can extract these documentation comments into a set of HTML files by using the JDK's javadoc tool, as follows:
javadoc HelloWorld.java
javadoc defaults to generating HTML-based documentation for public classes and public/protected members of these classes.