Hey all, a few questions about exception handling in
java.
First off: I understand that the finally{} block is meant to execute regardless of success or failure in the try{} block. So if I have the following:
This is by the book but strangely enough if I have the following:
Are there only certain circumstances where the finally block is essential to run code after an exception has been caught in a catch block? Or is it a matter of surety that code will run regardless of success or failure?
Question 2:
If I have a method:
I get a compile error if I try to use the method without an exception handler.
BUT...
if I have a method:
Java lets me compile without an exception handler when calling the method. Wierd, has anyone else run into this?
Tetsuo!