The basic composition of a programming language: character sets, identifiers, keywords, variables, constants, statements.
Cnost and Goto can no longer be used in Java.
Mian is a special name used to describe the starting method of a Java program, but it is not a keyword.
Naming rules for Java identifiers:
1. Cannot be a keyword or true, false, null.
2. Identifiers can contain letters, numbers, underscores, dollar signs.
3. The first character of an identifier must be a letter, underscore, or dollar sign.
4. Identifiers are case-sensitive and do not specify a maximum length.
Java Data type:
Byte 1 bytes (8 bits) short 2 bytes (16 bits) int 3 bytes (32 bits) long 4 bytes (64 bits)
Float 4-byte (32-bit) Double 9-byte (64-bit) Char 2-byte (16-bit) Boolean determined by the JVM
Sting string
How to convert between Java base data types:
1. All byte, short and char types will be promoted to int type
2. If one of the operands is a long type, the result is a long
3. If one of the operands is of type float, the result is a float type
4. If one of the operands is of type double, the result of the calculation is a double type
Pre-or post-increment/decrement ++/--unary operator + 、-、 ~,! Multiplication/Division/modulus */%
Add/Subtract/string links + 、-、 + move operators <<, >>, >>> comparison operators <, <=, >, >=
Equality operator = =,! = bitwise operator &, |, ^ condition and,or &&, | |
Trinocular operator? : Assignment operator = Extended assignment operator *=,/=,%=, + =,-=, <<=, >>=,
>>>=, &=, ^=, |=
Java Basic syntax