Java · Inheritance, polymorphism and interfaces
The object decides which version runs, but the compiler only knows the variable's type, and that decides what you may call.