I am trying to clarify the OP's original remark:
This is an incorrect assumption of how static works. The simplest way to think of static is that it belongs to the class, not an instance of...
Type: Posts; User: helloworld922
I am trying to clarify the OP's original remark:
This is an incorrect assumption of how static works. The simplest way to think of static is that it belongs to the class, not an instance of...
It's irrelevant because it doesn't matter if weight/age are pointers/references or not. They shouldn't be, but Java's memory model is all screwy and I'd have to look at a the JVM specs in detail to...
@KAJLogic stack/heap memory is irreverent here.
I would take syed's advice and read more about what static does. See: Understanding Instance and Class members.