My Java Coding specification

Source: Internet
Author: User

1, the class name uses the Hump name method, the first letter capitalization.

2, the class variable uses the Hump name method, the first letter lowercase.

3, the method name is a verb phrase, the first letter lowercase, as far as possible to describe the intent of this method.

4, note in the fine not many, a good note to try to describe the code to express the meaning.

5, a function of the different operations of the Code section separated by a blank line, convenient for later maintenance.

6, the variable name as far as possible with the expression change the intention of the name to be named, in addition to the loop variable can be simplified into i,j, other variables do not use a single letter to name.

7. A function to do only one thing

8. The constants are named with uppercase letters and underscores

9, the commented out code as far as possible to delete

10, resolutely avoid duplication of code, duplicate code should see how can be reconstructed.

My Java Coding specification

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.