Wrapper Classes
Wrapper Classes
The table below shows the primitive type and the equivalent wrapper class:
Autoboxing
The automatic conversion of primitive data type into its corresponding wrapper class is known as
autoboxing, for example, byte to Byte, char to Character, int to Integer, long to Long, float to Float,
boolean to Boolean, double to Double, and short to Short.
To create a wrapper object, use the wrapper class instead of the primitive type. To get
the value, you can just print the object: