+ 4
Wt is wrapper class in java
6 Answers
+ 6
The wrapper classes in Java are used to convert primitive types (int, char, float, etc) into corresponding objects. This process is known as boxing. Each of the 8 primitive types has corresponding wrapper classes.
In Java, sometimes we might need to use objects instead of primitive data types such as in collections. You can also store null value in a wrapper.
Note: Primitive types are more efficient than corresponding objects. Hence, when efficiency is the requirement, it is always recommended primitive types.
+ 2
what do you mean? What language are you talking about? Itâs not clear if you mean class as in an object oriented language or a class in e.g. css
+ 2
As soumic said it well , on convertion from primitive types to corresponding objects eg. is Integer class i posted a question yesterday , in Addition also the wrapper class may convert the objects into primitive types.
https://www.sololearn.com/Discuss/2735097/?ref=app
0
In java
0
//generally
class SomeClass {}
class Wrapp {
SomeClass c;
}