+ 3

are all data types classes and their variables objects in Java?

18th May 2017, 3:53 AM
Mayank Srivastava
Mayank Srivastava - avatar
3 Respostas
+ 6
Many, but not all. Things like int, boolean, double etc are all just basic variables, with no methods associated with them. There are, however, versions of some (like Integer, for instance) that make a class out of them for use in containers, etc. Java is largely about classes and objects, but they can't really get away with it all being that way.
19th May 2017, 3:15 AM
Jim
Jim - avatar
+ 6
My pleasure. Enjoy your primitives in Java, be a rebel!
19th May 2017, 3:29 AM
Jim
Jim - avatar
+ 2
thanks mate☺
19th May 2017, 3:20 AM
Mayank Srivastava
Mayank Srivastava - avatar