1, the keyword: in fact, Java gives a word specific meaning.
2, reserved word: The predecessor of the keyword, but not yet ready to give meaning to the word.
3. identifiers: We give a particular meaning to a word by ourselves. (class name, variable name, function name)
Note:1, number can not start
2, can not use keywords
4, constant : We will not be changed in the program amount. "Often" can be understood as the meaning of the normal, that is, a fixed posture.
5. Variables: An interval of memory, used to store data. Define variables when the data is uncertain or needs to be changed. (3 elements: The data type, the variable name, and the initialization value of the variable.) Scope: curly braces)
6. Data Type
1) Basic data type: Byte,short,int,long,float,double,char,boolean
2) Reference data type: arrays, classes, interfaces, (strings, strings can be attributed to classes in some sense)
Level from low to High: Byte,char,short (these three levels)-->int-->float--long-->double
Automatic type conversion: from low to high level, the system automatically turns.
Coercion type conversions: high-level data types to low-grade data types (data loss may occur)
7, Operation symbols:
1), Arithmetic operators
+-*/%/is the remainder,% is the provider, any integer%2 is not 0 is 1, so as long as the change is the divisor, you can realize the switch operation.
+: Connector
++,--
2), assignment operator
=,+, -=,*=,/= ,%=
3), Comparison operators
<,>,<=,>=
The result of this type of operator is either true or false
4), logical operators
&,|,^,!, &&,| |
Logical operator except! Unexpectedly, both links must be of type Boolean expression
Java basic Syntax (1)