Class name
The class name should be a noun, describing the object. Should follow the camel style , that is, only the first letter of each word capitalized.
Interface Name
The interface name should be an adjective, describing the function. should be "Able", "ible" end, otherwise it should be a noun. Usually follows the same size convention as the class name.
Public Interface Serializable {...} Public Interface Systempanel {...}
Method name
The method name should contain a verb. Write in uppercase and lowercase letters, beginning with a lower-case letter, and capitalized with the first letter of each word. The method name can also contain adjectives and nouns.
instance and static variable names
Instance variables should be nouns and should follow the same casing conventions as the method names .
Public String Waypoint;
parameter and local variable name
A single word, acronym, or abbreviation that should be a descriptive lowercase letter. If you need more than one word, you should follow the same casing convention as the method name.
The temporary variable name may be a single letter, such as a i,,j. The character variable c,d.
Generic type parameter name
The name of the generic type parameter should be a single letter in uppercase, suggesting T.
The collection framework uses generics extensively. E represents the collection element,S represents the service loader, and K and V represent the keys and values for the mapping.
Constant name
Constant names apply all large letters, and multiple words should be separated by underscores .
Enumeration name
The conventions for enumerating names and class names are the same. The enumeration collection of objects (selections) should all use uppercase letters.
Package Name
The package name should be unique and consist of lowercase letters. You can use underscores if you want.
Package Com.zhaoyu1995.fish_finder;
Public packages should be written in the order of the organization's Internet domain name, with the top-level domain name of a single word, followed by the organization, project, or department name (the inner package is usually named after the project).
Package names beginning with Java and javax are restricted and can only be used to provide a compliant implementation for the Java class library.
Acronyms
When an acronym is used in a name, the first letter of the initials should be capitalized when it is appropriate to use capital letters.
Public String getgpsversion () {...}
Java Naming conventions