In: Computer Science
A) What are wrapper Classes? What are the available wrapper classes?
B) What is Autoboxing and Unboxing?
Wrap meaning enclose, it represents a data type and gives an
object as appearance, wherever data type will be required as an
object, this object can be used.
In other word you can say that : mechanism to convert primitive into object and object
into primitive.
Major reason to use wrapper class
:
List of available Wrapper classes
In J2SE 5.0 autoboxing and unboxing has been introduced
The feature of converting primitive into object (into its equivalent Wrapper) and object into primitive automatically. The automatic conversion of primitive into object is known as autoboxing and vice-versa unboxing.
This is the new feature of Java help programmers a lot due to that java programmer doesn't need to write the conversion code.