2. Comment

Source: Internet
Author: User

2. Comment

----------- Android training, java training, and java learning technology blog. We look forward to communicating with you! ------------

In Java, there are three methods to annotate:

1 single choice ://

2 rows :/**/

3javadoc comments:/***/(usually used before a method or class. When you call it elsewhere, you can see the comments with your mouse over it)


Q: Should I add the word "comment" before the end note?

The end note is generally at the end of the document, listing the source of the citation, etc.

It is best to add a [comment]

The same is true for the footer, except that the footer is usually located at the bottom of the page and is generally used as a comment for a document.

Java Note: 1/***/2/3/***/What are the differences between their comment rows? O (partition _ partition) O

1 ./**...*/
This annotation is a java doc and will be used to generate class manuals in the future. JDK provides a tool for generating JAVADOC.
It can write information such as input and output parameters, authors, and interfaces of the class.
2. // a normal single line comment, which is displayed to the person who reads the code.
3./* .. */common multi-line comments are also displayed to the code reader.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.