NoFieldInheritance
DRAFT

Misconception:

An instance of a class contains exactly those fields declared in its class; fields declared in a superclass are not stored in the instances of the subclasses.

Incorrect

An object contains only the fields declared in its class

Correct

Correction
Here is what's right.

An object (an instance of a class) contains all the fields declared in its class, its superclass, and that class’ superclasses (transitively, all the way to the top of the class hierarchy, class Object).

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.