What is the application of wrapper class? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is the application of wrapper class?

3rd Apr 2018, 8:06 PM
Anshu Kumar Gupta
Anshu Kumar Gupta - avatar
4 Answers
+ 3
As there is no actual answers yet, someone please correct me if I am wrong, but I believe a wrapper class provides extra functionality for example int is a primitive data type not an object but you can use the Integer wrapper class to 'wrap' an int into an Integer object and use the functionalities which come with it, another wrapper class is Double
3rd Apr 2018, 8:30 PM
Tarantino
Tarantino - avatar
+ 3
we can use classes instead of using primitive data types .. using wrapper classes For eg: you can use Integer in place of int Double in place of double and many more.... There are many benefits of using wrapper classes by using wrapper classes instead of using primitive data types can make your program 100 percent Object Oriented ..
6th Aug 2018, 3:59 PM
Rishabh
Rishabh - avatar
0
for java rule
3rd Apr 2018, 8:10 PM
Anshu Kumar Gupta
Anshu Kumar Gupta - avatar
- 1
answer please
3rd Apr 2018, 8:08 PM
Anshu Kumar Gupta
Anshu Kumar Gupta - avatar