0
Why do we have classes corresponding to primitive data types and what's their use?
We have Integer class for int, etc
3 ответов
+ 2
they are wrapper to primitives. and ofcourse justify as object. and provies certain behaviors over primitive values.
0
to "wrap"
0
The concept of objects and why they are useful is that they have state and behaviour. Since "int" in itself doesn't provide any behaviour, the Integer class was made to implement certain behaviours and apply the concept of OOP. I hope I was clear. :)