Java Basic Learning--14, code format

Source: Internet
Author: User

Java Conventional Code format:

1, package name: preferably the domain name upside down, require all the letter lowercase;

2, Class name Interface name: One word capitalized, multiple words each word the first letter is capitalized

3, method name and variable name: One word all lowercase, multiple words from the first letter of the second word uppercase

4, constant: One word all uppercase, multiple words all uppercase and underline each word

Suggestion: If you can use English as much as possible

Code writing Format:

1, curly braces in pairs write, the opening brace at the end of the line code, the closing brace at the bottom of the line code, and align with the code;

2. There is a space in front of the left curly brace

3, the middle side of the statement with a space

4, the sentence block or the middle of the method plus a space

Java Basic Learning--14, code format

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.