A static
attribute is class specific, to me that means it is only an attribute of the class. I know that instances use instance variables. My question is, If I, say, create a class called Animal
and create a static attribute called live
(which makes sense because being live is a static attribute of Animal), then why it won't be for instances such as dog
, human
, but only the class Animal
? They are all live too and here I can see instances are really sharing this static attribute live
.
Please don't give me Java definition or Oracle document definition; I know all that. As a beginner I was wondering why it's not making sense in the literal terms.