Java Comment Description

Source: Internet
Author: User

Comments
What is a comment? is the meaning of annotation, which is mainly used to explain Java code. There are three ways to annotate in Java (1)://: Comment Line statement
Example:
Defines an int variable with a value of 10 int a = 10;
(2):/* * *: Multiline comment
Example:/*
This is a comment that will not be used by Java to run this is the second line of comments, can have any number of lines */
(3):/** * *: Documentation comments
A document comment that precedes the declaration of a variable, method, or class, indicating that the comment should be placed in an automatically generated document (the HTML file generated by the Javadoc command) as a description of the claim.
Example:/**
* This is a test of a document comment
* It will generate a standard Java interface document via Javadoc */
A tag that begins with "@" is often added to the Javadoc annotation, and the parameters of the Javadoc directive can be used to produce a specific tag in the generated API document.

Java Comment Description

Related Article

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.