1. Object wrapper classes for basic data types
BYTE byte
Short Short
int Integer
Long Long
float float
Double Double
Char Character
Boolean Boolean
2. The most common effect of the basic data type Object wrapper class:
is to convert between the base data type and the string type.
2.1 A method of turning a basic data type into a string. Xxx.tostring (base data type value)
Basic data type + ""
The base data type. toString (base data type value);
such as: Integer.tostring (34);//convert 34 integers into "34";
2.2 The way the string is converted to the base data type. Xxx.parsexxx (String)
xxx a = xxx.parsexxx (String);
int a = Integer.parseint ("123");//Must be added ""
Boolean B = Boolean.parseboolean ("true")
Integer i = new Integer ("123");
int num = I.intvalue ();
3. Input Conversion method
The decimal is converted into another binary.
Xxx.tobinarystring (decimal value);
Xxx.tohexstring (decimal value);
Xxx.tooctalstring (decimal value);
Other binary turns into decimal.
Xxx.parseint (String,radix);
New features that occur after the 4.jdk1.5 version.
integer x = new Integer (4);
Integer x = 4;//Auto-boxing. New Integer (4)
x = x/* X.intvalue () */+ 2;//x+2:x for automatic unboxing. into an int type. and 2 for addition operations.
And then the boxing is assigned to X.
java-basic Data type extension (its wrapper class)