In addition to embedding HTML and @see references, methods allow you to use document tags for parameters, return values, and violations.
1. @param
The format is as follows:
@param parameter Name Description
where "parameter name" refers to an identifier within the parameter list, and "description" represents some descriptive text that can be persisted to subsequent lines. Once a new document tag is encountered, the previous description is considered to end. You can use any number of descriptions, one for each parameter.
2. @return
The format is as follows:
@return Description
Where "description" refers to the meaning of the return value. It can be extended to the back of the line.
3. @exception
Details of the "contravention" (Exception) will be covered in chapter 9th. In short, they are special objects that, if a method fails, can be "thrown out" of the object. When a method is invoked, although only one of the offending objects appears, some special methods may produce any number of different types of violations. All these violations need to be explained. Therefore, the format of the offence markings is as follows:
@exception Full class name description
The "Full class name" explicitly specifies the name of an offending class, which is defined elsewhere. The "description" (which also extends to the line below) tells us why this particular type of violation appears in the method call.
4. @deprecated
This is a new feature of Java 1.1. This tag is used to indicate that some of the old features have been replaced by new, improved functionality. The role of this tag is to recommend that users do not have to use a particular feature, because it may be discarded in future revisions. If you mark a method as @deprecated, you receive a warning from the compiler when you use this method.