There is a little bit of confusion in Overloading and Overriding... If kindly anyone could help. See below:
My questions are: - Are the two methods overloaded or overriden? - Why is the method of Over class called and not that of below class
Sandy [ September 11, 2005: Message edited by: Barry Gaunt ]
Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?
Joined: Aug 28, 2005
sorry for previous code.... i have modified it now
why is the method of below class not called ..? [ September 11, 2005: Message edited by: Sandeep Chhabra ]
Since you have now modified your code, I have removed posts that could be considered misleading. I cannot remove the first post because the whole thread would go away.
There is no overriding here because the both the methods called method have different parameter types. The method caller in class over can only see the method method which takes an Exception as parameter. So that is the one that gets called. [ September 11, 2005: Message edited by: Barry Gaunt ]