I have a strange (and maybe silly) question: I was wondering.... why is java "Object" class called "Object", not "Class"?
For example, for ArrayList whe have the following hierarchy
Object ->
Collection ->
List ->
ArrayList
Ok: ArrayList is a List... List is a Collection... but a Collection (the class of all collections) is not an Object... it is a class!
Think about what the object itself is. An ArrayList is a list, yes? It's also an object. It's not a class of object. The class name describes what instances of that class represent.
A collection isn't a class of collections - it's a collection (and it's an object).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With