posted 15 years ago
I complied your code and it throws the error like "reference to method is ambiguous, both method method(String s) and method(Integer s)".
The rule is something like this:
The method which is nearest to the parameter is called first, means, the child class object is first checked, then its parent, and then its parent and so on..
e.g
If we comment out the "integer version", then it looks for parent class
e.g
HTH