First, what annotations are included in Java
1.//is used for single-line comments.
The 2./*...*/is used for multiline annotations, starting from/* and ending with */, not nested.
3./**...*/is a comment statement that is unique to support the JDK tool Javadoc.exe. This is what we know about document annotations.
In the naming console: Use the command line to enter the Javadoc + file name in the directory where the target file resides. java.
Second, the key noun of document annotation
/**<p> Tags for action </p> *@authorA class or method is typically used to describe an open person *@versionclass Version Description *@seea reference to the description of the class, attribute, method, or related topics *@parammethod Description of the method parameter *@throwsdescription of the method for the exception *@returndescription of the return value of the method * {@value} method, a class, a property that can be used to generate the value of a marked constant field. * {@inheritDoc} methods, classes can integrate comments from the previous document * {@link} class, Method link label * {@linkplain} class, Method link label, unique to the previous label is different because the font is different, if the label is a plain text, then use Linkplain *@sinceclasses, Methods Express which release version of the tagged element is introduced *@exceptionmethod is the same as @throws's usage *@serialData* <pre> method, class Yes, that's the HTML tag that's used to show "original look." */
A city example
1 Public voidAA () {2 3 }4 5 6 /**in general, these annotations are open enough for use.7 * @authorMingge8 * @since1.09 * @see#aa () View the AA methodTen * @parama parameter a One * @returnreturn Value Description A * @throwsException Description - */ - Public intTestintAthrowsexception{ the returnA; -}
I think a lot of details still need to learn, everyday study, progress every day!
Reference: https://hacpai.com/article/1402537988442
Java Documentation Comments Main use method