How to use annotations in Java
When you write a program, you often need to add some comments to describe the role of a piece of code.
In General, for a specification of the program source code, the comments should be accounted for the source code 1/3 above. Therefore, note is an important part of the program source code, we must pay attention to Oh!
Java There are three types of comments in: single-line comment, multiline comment, document comment
Operation Result: ? Hello imooc!
look: The commented code block will not be executed while the program is running ~~
we can pass ? Javadoc? command to extract the content from the document comment, and generate the program's API Help documentation.
Open the Home page to view the generated API Document
PS : You can also use document annotations when you use ? Javadoc tag to generate more detailed documentation information:
? ? ? [email protected]? identify the author of the development of such modules
? ? ? [email protected]? indicate the version of this class of modules
? ? ? [email protected]? reference steering, i.e. related topics
? ? ? [email protected]? description of a parameter in the method
? ? ? [email protected]? description of the return value of the method
? ? ? [email protected]? description of the exceptions that the method might throw
Generate help Documents in Java