Java method overloading + double dispatch
- by Max
Can anybody explain in detail the reason the overloaded method print(Parent parent) is invoked when working with Child instance in my test piece of code?
Any pecularities of virtual methods or methods overloading/resolution in Java involved here?
Any direct reference to Java Lang Spec?
Which term describes this behaviour?
Thanks a lot.
public…