Identifier:
Start with a letter, underscore (_), dollar sign ($)
You cannot use keywords
Case sensitive
You can divide int a = 1_0000_0000_1121 with an underscore;
Data type:
int defaults to decimal, octal starts with 0, Hex starts with 0x
SYSTEM.OUT.PRINTLN (*) Default output decimal
* at Integer.tobinarystring ()-and binary; octal (octal); Hex (hex)
If the size of the data does not exceed Byte/char/short's stated range, it can be automatically transformed ☆1
Long int constant at the end plus L
Floating point number:
Floating-point constants default double, turn float at the end plus F
There are rounding errors, such as the need for high precision error-free, using the BigDecimal class; Long->biginteger
Character type:
Because Java uses Unicode, it allows you to assign a Chinese character to a char variable
Strings string
Boolean:
Boolean
Type conversions:
☆1
Binary operations Generate type promotion
Java Learning notes-identifiers, data types, floating-point numbers, character types, booleans, type conversions