1,java keywords: goto and const are reserved keywords and are not implemented in Java. True false and Null are special literal values that, technically speaking, are not Java keywords.
2, identifier: Is the word we use in Java code.
⑴, identifiers cannot be keywords or true,false,null.
⑵, identifiers can contain letters, numbers 0-9, underscores (_), or dollar signs ($).
⑶, the first character of an identifier must be a letter, an underscore (_), or a dollar sign ($).
⑷, identifiers are of a different size, and no maximum length is specified.
3, data type: The Java language itself contains eight data types, and these eight data types, called basic types, are the basic construction units for creating classes.
Eight basic types of Java:
⑴ integer: ①byte (Size: 1 bytes, 8 bits)
②short (Size: 2 bytes, 16 bits)
③int (Size: 4 bytes, 32 bits)
④loog (Size: 8 bytes, 64 bits)
⑵ Float Type: ⑤float (Size: 4 bytes, 32 bits)
⑥duoble (Size: 8 bytes, 64 bits)
⑶ character type: ⑦char (Size: 2 bytes, 16 bits)
⑷ Boolean type: ⑧boolean (size: indeterminate, determined by the JVM)
Reference type: ① classes: Class
② Interface: INTCRFACC
③ Array
4, variables: variables are used to store data.
5, when performing mathematical expression operations in Java, there are the following automatic type hint rules:
⑴ all of the byte type, short and char types will be promoted to the int type;
⑵ if one of the operands is a long type, the result is a long type;
⑶ if one of the operands is a float type, the result is a float type;
⑷ if one of the operands is of type double, the result is a double type.
Beyond the range of 32 bits of int type, this literal cannot be considered an int type. In this case, we must add an L to the literal to indicate that the literal must be stored in a long type.
6, escape character: ①\b, backspace, ②\t, tab, ③\n, newline, ④\r, enter, ⑤\ "double quote, ⑥\ ', single quote, ⑦\\, backslash.
7, constant: You can declare a variable as a constant (that is, the amount that cannot be changed).
8, Operator:
⑴ pre-or post-increment and decrement: ++,--;
⑵ unary operator: +,-,~,! (forced conversion);
⑶ multiplication, except, take surplus: *,/,%;
⑷ Plus, minus, string connection: +,-,+;
⑸ move operator:<<,>>,>>>;
⑹ comparison operator:<,<=,>,>=,instanceof;
⑺ equality operator: ==,! =
⑻ bitwise operator:&,|,^;
⑼ Conditions and,or:&&,| | ;
⑽ three-mesh operator:? : ;
⑾ assignment Operator: =;
⑿ Extended assignment operator:*=,/=,%=,+=,-=,<<=,>>=,>>>=,&=,^=,|=;
9,java Note: ⑴ with two forward slash//, single-line comment;
⑵ with/* */, multi-line comment;
⑶ with/** */javadoc comments.
Java Base language