Originally posted by amit taneja:
it will simply return "25"
because its invoking area method defined in Aquare method...
The method invoked here is the area method of Rectangle class. So it will return 20, The reason there is no ambiguity in resolving the method is because the area method in the rectangle is the most-specific method.
For more info on most-specific method click
here Hope that helps
Cheers,<br />Jay<br /> <br />(SCJP 1.4)<br />Heights of great men were not achieved in one day, they were toiling day and night while their companions slept.