Marker
1.1 marker : A valid sequence of characters used to flag the class name, variable name, method name, type name, and file name as a marker.
1.2 naming rules:
The Java language specifies the identifier by letter (a-za-z), underscore (_), dollar sign ($) and a number (0-9) , and the first character cannot be a number.
Specific details:
The ① marker is made up of letters, underscores, dollar signs, and numbers, and is unlimited in length.
The first character of a ② glyph cannot be a numeric character.
The ③ glyph cannot be a keyword.
The ④ flag cannot be true, FALSE, and null.
In addition, there are many common naming conventions in Java, these are generally referred to as project specifications, in actual programming, the project specification is very important to the project, the enterprise also attaches great importance to the code of a person. In general, the common identifier naming conventions are:
variable :1> If it is a single word, the words are all lowercase letters. such as: int count;
2> if it is a compound word made up of multiple words, except for the first word, then all the first letters of the word
Capital. such as: int sumscore; (This naming method is called the Hump nomenclature, also known as the Hungarian nomenclature).
constants: constants All words are capitalized, and if they are made up of multiple words, they are connected by underscores. such as:
public static final String person_name = "Zhangsan";
method: The method naming specification is similar to a variable, such as count (); Getsum ();
class: The first letter of all words in the class name is capitalized. such as person{}, datacenter{};
Package: named with a lowercase inverted domain name. Format: Prefix + project name + module name + layer such as:
Org.itfuture.domain.sorts;
See the Java Coding Specification (Huawei)
Java Road of the Gods (2)-marker