1. Environment variables are usually referred to in the operating system and are used to specify some parameters that the operating system needs to run
2. The variable name begins with a letter, underscore, or dollar sign (¥ above 4), cannot start with a number, is followed by letters, underscores, dollar characters, numbers, variable names are case sensitive, no length limit
Hump Naming method:
1. Variable names should use meaningful English words
2. Variable name if there is only one word, all the letters are lowercase
3. If a variable name consists of multiple English words, capitalize the first letter from the second word
For example:
1. Name the valid variable:
1.Password
2.last_name
3. $abc
4._ref
2. Correct variable naming
1.password
2.lastName
3. BOOL values in Java, only true and false two, not 0 and not 0, or empty and non-null representations, for example, here means the third row error, cannot assign the int variable to the Boolean variable
4.java uses Unicode character codes, which means that the character set of any language in the world can be used in Java, and a char type variable can store a Chinese character, that is, the same storage space used for Chinese characters and English characters.
5. Garbled appearance: Use a character set to convert Chinese characters to code, but the system uses the B character set to convert the encoding into Chinese characters, there will be no code found, garbled
6.
After the source code is changed, it will be recompiled to generate a new class file before executing.
Naming usage rules for Java variables