Java Naming rules
Standardized purpose: to standardize the coding process and develop good behavior habits for future program development.
1. All project names are in lower case
2. All package names are in lower case
3. The first letter of a class name is capitalized. If the class name is composed of multiple words, the first letter of each word must be capitalized.
For example, public class MyFirstClass {}
4. The variable name and method name are in lower case. If the name is composed of multiple words, the first letter of each word must be in upper case. (Hump type)
For example, int index = 0;
Public void toString (){}
5. All constant names are capitalized.
For example, public static final String GAME_COLOR = "RED ";
6. All naming rules must follow the following rules:
- The name can only contain letters, numbers, underscores, and $.
- Cannot start with a number
- The name cannot use keywords in JAVA.
- Chinese and Pinyin names cannot appear.
7. Maven naming rules
Both GroupId and ArtifectId are in lower case. Multiple words are separated by commas (-) and do not use hump.