Field Selection
Let e be a reference expression of type t, where t is some class. i.e., at run time expression e will evaluate to a reference to some object of type t’, where t’ is t or a subtype of t.
Question. Suppose you select field f on whatever object e refers to . Which field f is invoked?
Answer. The first definition of f found (at compile time) in the class hierarchy, starting at t, working up through its superclasses, to Object. Note that t and not t’ is used to resolve the field reference.