@author Firstname Lastname <address @ example.com> * @version 1.6 (current version number of program) * @since 1.2 (the version of the package this class was first added to) */ public class Test { // class body } For methods there is (1) a short, concise, one line description to explain what the item does. This is followed by (2) a longer description that may span multiple paragraphs. The details can be explained in full here. This section is optional. Lastly, there is (3) a tag section to list the accepted input arguments and return values of the method. Note that all of the Javadoc is treated as HTML so the multiple paragraph sections are separated by a "<p>" paragraph break tag. /** * Short one line description. (1) * <p> * Longer description. If there were any, it would be (2) * here. * <p> * And even more explanations to follow in consecutive * paragraphs separated by HTML paragraph breaks. * * @param variable Description text text text. (3) * @return Description text text text. */ public int methodName (...) { // method body with a return statement } Variables are documented similarly to methods with the exception that part (3) is omitted. Here the variable contains only the short description: /** * Description of the variable here. */ private int debug = 0; Note that it is not recommended to define multiple variables in a single documentation comment. This is because Javadoc reads each variable and places them separately to the generated HTML page with the same documentation comment that is copied for all fields. /** * The horizontal and vertical distances of point (x,y) */ public int x, y; // AVOID Instead, it is recommended to write and document each variable separately: /** * The horizontal distance of point. */ public int x; /** * The vertical distance of point. */ public int y; Table of Javadoc tags Some of the available Javadoc tags are listed in the table below: Examples An example of Javadoc to document a method follows. Notice that spacing and number of characters in this example are as conventions state. /** * Validates a chess move. * * <p>Use {@link #doMove(int fromFile, int fromRank, int toFile, int toRank)} to move a piece. * * @param fromFile file from which a piece is being moved * @param fromRank rank from which a piece is