publicStringsomeMethod() {// This is a commentfinalInteger 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*/publicStringgetEmployeeName(finalInteger id);