InterviewSolution
Saved Bookmarks
| 1. |
Why do we need Wrapper classes in Java? |
||||||||||||||||
|
Answer» A WRAPPER class is a specific class whose object CONTAINS or WRAPS PRIMITIVE data types. It can also be said that primitive data types are wrapped into an object of a wrapper class. Some of the reasons the wrapper classes are required in Java are given as follows:
A list of all the primitive data types and the corresponding wrapper classes is given as follows:
|
|||||||||||||||||