Originally posted by Chandra Bhatt:
Thanks Keith, and Krishnan!
Any unchecked exception is free from all the discussed bondage.
Originally posted by chintan
I think you needed to declare "THROWS" with amtehod()(first one), may be that causes compilation error.
Hello Chandra, here BadObjectException is subclass of RuntimeException, so compiler shouldn't complain for the second method - anotherMethod().
The only difference being the 'Exception' in the first class has been replaced by 'TestException'.