This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Error vs. Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error vs. Exception" Watch "Error vs. Exception" New topic
Author

Error vs. Exception

Drew Lane
Ranch Hand

Joined: May 13, 2001
Posts: 296
If an error is caught, is the finally method guaranteed to be called or is this only true with exceptions?
Also, would an error cause a Thread to stop running?
I'm mainly referring to java.lang.OutofMemoryError.
Thanks,
Drew
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
In JLS �14.19.2 they use 'completes abruptly' instead of the terms 'error' and 'exception', which leads me to believe that, yes, the finally block will be executed on any 'interuption' in its companion try block.
 
jQuery in Action, 2nd edition
 
subject: Error vs. Exception
 
Similar Threads
WA #1.....word association
Getting error in setupConnection()
problem in retreiving value
Regarding tomcat
print statement in the declaration ...