Qiong Yao's "Green River Grass" shows an era of elope feelings ... Learning Java and C #, always feel that the two identifiers are very different naming rules, here to do a record, the difference between ...
One: Java identifiers
1) What is an identifier
The sequence of characters used in Java to name features such as variables, methods, and classes is called an identifier.
(Brain Tonic: All the places where you can name them are called identifiers)
2) naming rules for identifiers
Identifiers consist of letters, underscores, dollars $, or numbers.
Identifiers should start with a letter, underscore, dollar $ sign, and prohibit starting with a number.
in Java, identifiers are case-sensitive and have unlimited lengths.
The identifier can not be the same name as the keyword, that is, to avoid, and the old dynasty can not take the emperor, Hee Xi ...
The name of the identifier as far as possible "see the name", Prohibit the "dog egg", "Stone" "dog" and other names.
Two: C # identifiers
1) directly on the naming rules, ah ah ah ...
identifiers consist of letters, underscores,@ symbols , or numbers.
Identifiers should begin with a letter, an underscore, an@ symbol , and a number.
in C #, identifiers are case sensitive.
C#&java's Green River Grass identifier elope ...