First, high-level language composition
① data type ② variable ③ operator, expression, statement ④ identifier (System pre-defined and user-defined) ⑤ syntax rules
Second, naming norms
1. All uppercase letters of the constant letter
2. First capitalization of class name
3. Project Name lowercase
4. Variable name lowercase, followed by the first uppercase of a word
5. See the meaning of the name
6. Hump Naming method
Third, the data type
8 basic data types and reference data types
Reference data type such as String
Constant modifier final, such as final double PI = 3.14;
Basically the following:
Iv. Automatic data type conversion
Number default int, decimal default double
float A = 3.2F
Double b = 4.6D
Small turn large, automatic turn, big turn small, forced to short C = (short) 3.4
String connector +, directly add the string together, powerful link function
When executed sequentially, strings are added to the numbers, which are directly linked together. Number plus number, value added
V. Transfer characters (control format)
Commonly used is \ t, \ r \ n
Vi. operators
Operators are divided into arithmetic operators, logical operators, relational operators
Increment operator rule: ++i, symbol in front, first calculate after use, i++, symbol after, first use after calculate
Three-mesh operator?: expression 1? Expression 2: Expression 3 (1 established 2, otherwise 3)
Vii. common shortcut keys for Eclipse
alt+/Auto Association
Ctrl+d Delete a row
Ctrl+shift+c ctrl+/Comment One line or the selected
Ctrl+k to find the selection quickly
Ctrl+shift+f typesetting
Eight, numerical overflow processing
First convert to 10, then the complement to the original code (take the inverse plus one)
The highest bit is the sign bit, and the 0-bit +,1 is-
Negative number two-stage system representation method: positive negation in plus one
Java Chapter II Summary (data type, operator)