+ 5
Interview question.
What are Wrapper Classes and String classes?
2 Réponses
+ 2
Wrapper classes
+ 2
In java there are primitives(int double...) and objects(String Point...).
If you need an int but as an object (eg. in a ArrayList which is generic so you need to specify the type and therefore its content has to be some kind of object) you need to wrap them.
for each primitive there is a wrapper class so basically an object representation.
usually you do not need to do this explicitly as java has a feature called auto boxing which wraps the primitives into objects and vice versa if needed