Any Checked exceptions can't be thrown with out a try block or declaring method to "throws SQLException" . But m1().. thrwing Exception right. Then there should be no problem with SQLException [ March 29, 2007: Message edited by: Srinivasan thoyyeti ]
I think the main point of this example was to test your knowledge of what happens if the finally block includes a return or a throw. [ March 29, 2007: Message edited by: Keith Lynn ]
Joined: Jan 05, 2006
Thanks to all for helping.this is the program,i an running
SQLException and IOException's are subclasses of Exception and the Exception is declared.Then why the error at line1 is coming?
Joined: Feb 07, 2005
I believe the creators of the question meant that the code could potentially throw a SQLException.
Again, the point of the question what not SQLException or IOException. It was to test to see if you understand what happens when you have a throw or return statement in a finally block. [ March 29, 2007: Message edited by: Keith Lynn ]