Hi Ranchers,
Given the code below;
The explanation given is " This code will not compile because of the Exception declared on the Animal eat(). This happens though at runtime, the eat() method used would be the Dog version, which does not declare the exception."
I couldn't able to understand aptly.So, please help Ranchers.
Source:
SCJP for
Java 6 guide(Kathy Sierra and Bert bates)
Page 108.
I thank in advance and will be much obliged.
[ December 14, 2008: Message edited by: Raj kumar ]
( Jesper Young: Added code tags )
[ December 15, 2008: Message edited by: Jesper Young ]