A Wrapper class is a class whose object wraps or contains a primitive data type. When we create an object in a wrapper class, it contains a field and in this field, we can store a primitive data type. In other words, we can wrap a primitive value into a wrapper class object.
The need of wrapper classes:
1. They convert primitive data types into objects and this is needed on the Internet to communicate between two applications.
2. The classes in java. util package handles only objects and hence wrapper classes help in this case also.
Question and answer is powered by AnsPress.io