According to the Java Object-oriented principle, each basic type has a corresponding wrapper class
BYTE byte
Short Short
int Integer
Long Long
Boolean Boolean
float float
Double Double
Char Character
The most common function is the conversion of the base type to string string types
Turn into a string: wrapper object . toString ()
The string is converted to the base type: wrapper class . ValueOf ()
decimal-to-binary: Call integer.tobinarystring ()
Decimal to 16 binary: Call integer.tohexstring ()
Binary to decimal: Call integer.parseint ("binary", 2)
Hexadecimal to decimal: Call integer.parseint ("hex", 16)
Automatic Boxing
Integer x=4, numbers of type int are automatically boxed into an integer object
Automatic unpacking
X=x+2,anInteger object is automatically disassembled into an int type for calculation
When the value is within the byte range, no new space will be opened for the new feature
Integer a=128
Integer b=128
SYSO (a==b)// normal false at this time
Integer a=127
Integer b=127
SYSO (a==b)// special True at this time
[Javase] Basic data type Object wrapper class