Hi
Given two methods on the same class in Java :
public void doSomething( Person person );
public void doSomething( Employee employee );
where
Employee extends Person
If I call :
doSomething( employee )
I find that doSomething( Person ) get's invoked.
I'd have expected the overload with the closest matching contract be invoked, not with the most abstract (which is what I'm finding)
Could someone explain why?
Regards
Marty