Starting with version 5.0, Java will automatically do the boxing and unboxing operations.
Example: The three statements we have seen before performing the boxing operation can be equivalently rewritten in the following simpler way without making use of the constructors.
Integer anIntegerObject = 25; Double aDoubleObject = 3.6; Character aCharacterObject = 'A';
Example: The three statements we have seen before performing the unboxing operation can be equivalently rewritten in the following simpler way without making use of the access methods.
int i = anIntegerObject; double d = aDoubleObject; char c = aCharacterObject;