Method signatures are determined at compile time.
.met(A)
must be called because the signature does not change depending on the actual type of the object, only the type is represented.
However, polymorphism is used to determine which implementation of this signature is called.
The this object is C , which extends B , and therefore the implementation in B is the one that is called.
This is why B.met(A) called.
Peter Lawrey
source share