posted 20 years ago
Question 59.
Given that method aMethod() throws BaseException, SubException and RuntimeException of the following exception hierarchy
Ans is : C and D.
Can't B also be considered correct. Even though it is not required to throw (handle or declare) a Runtime Exception, its not illegal to throw (handle or declare)it.
In option B we are declaring the BaseException anyway, and in addition also throw Runtime...is this wrong?
Monisha.
[ Jess added [code] tags to preserve whitespace... ]
[ April 10, 2003: Message edited by: Jessica Sant ]
Hey! It compiles! Ship it!