Comments

public String someMethod() {
   // This is a comment
   final Integer value; // This is a comment for a variable
}

Javadocs

A more advanced form of comment are the Javadocs, described in their own article.

/**
* Returns the employee with the received code.
*
* @param id
*            employee id
* @return name of the employee with the id
*/
public String getEmployeeName(final Integer id);

Last updated