+ 1
Wht is the meanig of wrapper class. Everyone use this class but why??
4 ответов
+ 17
A Wrapper class is a class whose object contains a primitive data types. When we create an object to 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 and perform some further operations on it.
You can refer the below threads for more explanation.
https://www.sololearn.com/discuss/606385/?ref=app
https://www.sololearn.com/discuss/1190896/?ref=app
https://www.sololearn.com/learn/432/?ref=app
+ 7
There used to turn primitives types into objects.
+ 6
sometimes we cant use primitive types when we need it because the parameter doesnt accept primitive types
for example you want to use an arraylist for your integer but ArrayList<int> will cause an error, because we need a class. this is where we'll need a wrapper class
ArrayList<Integer>
+ 1
Thanks for all of you..