File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exceptions.Any help. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Exceptions.Any help." Watch "Exceptions.Any help." New topic

Exceptions.Any help.

Ranch Hand

Joined: Oct 02, 1999
Posts: 31
Q)if an exception is not caught, the finally block will run and the rest of the method is skipped.
Is this true.
When the exception is not caught the finally block runs and again exception passes into the same method,.
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
Yes, it's true. Because the exception has to be handled somewhere, and since it's not going to be in the method (it wasn't caught), then it has to propagate upwards (the exception) and control must leave the method in which the Exc was thrown and not caught (AFTER executing the finally if present, of course).

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
I agree. Here's the link:
subject: Exceptions.Any help.
It's not a secret anymore!