1. Integer (the default type is int)
If the data is larger than the range of type long, you can use the BigInteger class
Binary conversions:
Octal: 0 Opening
Hex: 0x or 0X start
Integer.tobinarystring (); //Convert to binary
Integer.tooctalstring (); //Convert to octal
Integer.tohexstring (); //Convert to hex
Type conversions:
If the size of the data does not exceed the type representation range you want to convert, you can automatically transform it.
Long type:
Long a = 123456L //l preferably capitalized, otherwise easily and 1 confused
2. Float type (default type is double)
There are rounding errors in floating-point numbers, such as the use of the BigDecimal class if you want an exact number that does not produce rounding errors
Avoid using floating-point types when comparing number sizes
The wording of E:
314e-2 = 3.14 //indicates 314*10^ ( -2)
Float usage:
float a = 3.14F //F indicates floating-point constant is float type
3. Characters
\ //escape character for special characters such as output ' \ \
Java Data types