File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Programmer Certification (SCJP/OCPJP)
try catch block
Joined: Mar 09, 2007
Jul 27, 2000 12:21:00
Say there is a try block in which an exception is thrown. But the only exception that can be caught is one that is a parent of the exception that is actually thrown.
Will this exception be caught ?
Joined: Aug 13, 2000
Jul 27, 2000 18:29:00
Yes. Whenever you have a catch block which handles a particular exception, then all the exceptions which are the subclasses of that particular Exception are also caught with the same block.
I agree. Here's the link:
subject: try catch block
Benefits of a try... finally only block
Roundup question #132
Try Catch Finally - Voodoo Question
try-catch-final and throw new Exception cert question
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015