Introduction to Java Basics Essay (9) version Javase

Source: Internet
Author: User

In the previous section of

, some static variables and the definition of static methods are used, as well as non-static differences, which are supplemented by the following:

If all methods in a class are static and have no member variables, You need to restrict the corresponding class. The class cannot create an object, as follows:

private Arraytool () {}

//methods in the class are static, so the class is not required to create objects. To ensure that other objects are not created, the constructor of the class can be privatized.

1. Document comments

Use the Javadoc tool in the Java pseudo-machine to generate document comments and generate them using the document annotations in the code.

Note:

    1, each compilation unit (class file) can have only one public class
     2, the public class name (including case) must be the same as its class file. The public class may not exist in
    3, a class file (*.java). The

uses the Javadoc tag: the

Javadoc tag is made up of the tag type and the private comment reference followed by "@"
the Javadoc tag has the following:
@author indicate the author of the module being developed
@ Version indicates that the versions of this class of modules
@see Reference steering, that is, related topics
@param description of a parameter in a method
@return description of the method return value
@exception Description of the exception that the method might throw

For details, refer to Bluestorm's space for the use of Javadoc annotations

 

 

Introduction to Java Basics Essay (9) version Javase

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.