3 ms·
Your statement is wrong, in the following sense: at runtime, the call to x.foo() would always start look at the runtime type (which in this case is Bar, or some
by burakemir 7y ago
Your statement is wrong, in the following sense: at runtime, the call to x.foo() would always start look at the runtime type (which in this case is Bar, or some subclass of it) - otherwise overriding methods would not work.
https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.4.4 https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.htm...
- frant-hartm 7y agoYes, I forgot a method parameter there.