Java Naming conventions

Source: Internet
Author: User

1. Project Name

All lowercase, such as: test

2. Package Name

All lowercase, such as: Com.tju.lirui.test

2. Class name

Capitalize the first letter of each word, such as: HelloWorld

3. Variable name

1, static variables: All uppercase, the words with the underscore "_" separate, such as: Boolean_flag

2, ordinary variables: First letter lowercase, the beginning of each word capitalized, such as: Wordtype

4. Name of function

1. In the function name, the first letter is lowercase, then the first letter of each word is capitalized, such as:querystudentlist (...)

2, function name to be able to

5. Interface Naming conventions

1, the interface name should start with "I", such as: Idriver
2, the interface in the beginning of each word letter to uppercase, other letters to lowercase, such as: Idriver

6. Interface implementation Class name specification

1, the interface implementation class name to end with Impl, such as: Cameradriverimpl

2. Follow the preceding class naming conventions.

5. Abstract class name specification

1, abstract class to start with "A", such as: Adriver

2. Follow the preceding class naming conventions.

Java Naming conventions

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.