Java programs have two types of Annotations: Implementation comments and document comments ). Implementation annotations are those that have been seen in C ++ and are defined using/*... */and. Document comments (known as "Doc comments") are unique to Java and are defined. You can use javadoc to convert document comments into HTML files.
Implementation annotations are used to annotate code or implementation details. The document comments describe the code specification from the perspective of implementation-free. They are used to give a summary of the Code and provide additional information that the Code itself does not provide.
The program can have four annotation styles: block (Block)-block annotation is usually used to provide descriptions of files, methods, data structures and algorithms; single-line (single-line) -- short comments can be displayed in a row and have the same indentation level as the subsequent Code; tail (trailing) -- very short comments can be in the same line as the code they want to describe; end-of-line (end-of-line) -- annotator "//", which can be used to comment out a part of an entire line or line.
This document describes Java classes, interfaces, constructors, methods, and fields ). Each document comment will be placed in the annotation separator/**... */. A comment corresponds to a class, interface, or member, before the declaration.
For more information about document comments and javadoc, see javadoc home page: http://java.sun.com/javadoc/index.html
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service