HI, sriram , let's take a look at some code:
According to the above code, we can reach the following conclusion:
<code>
1. Implementation method in class need not throw the exception defined in the interface, like method1().
2. If the implementation method in class intends to throw any exception, the exception should not be wider than the exception defined in the interface, like method2(). I think that is the reason some interface method throws Throwable since in that case, the implementation method can throw any exception.
3. Implementation method in class cannot throw wider exception that is defined in the interface.
</code>
Hope that helps.
Guoqiao
Originally posted by sriram gupta:
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum