This week's book giveaway is in the OCAJP forum. We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line! See this thread for details.
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
posted 12 years ago
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.