Advertisements
Advertisements
Question
Write two importance of wrapper class.
Short Answer
Advertisements
Solution
There are mainly two uses with wrapper classes.
- To convert simple data types into objects, that is, to give object form to a data type; here constructors are used.
- To convert strings into data types (known as parsing operation'), here methods of type parseXXX() are used.
shaalaa.com
Is there an error in this question or solution?
Chapter 5: Library Classes - Exercises [Page 134]
