The conversion of a primitive type value to an object of the corresponding wrapper class is called boxing. Also, the conversion from an object of a wrapper class to the corresponding primitive type value is called unboxing.
Converting between primitive and reference types
Boxing
The boxing of a primitive type can be done either automatically (called autoboxing) or explicitly using the valueOf() method available in each wrapper type:
int i1 = 42;
Integer i2 = i1; //autoboxing
//Long l2 = i1; //error
System.out.println(i2); //prints: 42
i2 = Integer.valueOf(i1);
System.out.println(i2); //prints: 42
Byte b = Byte.valueOf((byte)i1);
System.out.println(b); //prints: 42
Short s = Short.valueOf...