A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Programmer Certification (SCJP/OCPJP)
Execution of finally
Joined: Sep 22, 2006
Sep 23, 2006 22:41:00
Consider this block
Will finally block execute? If so which executes first System.exit() or finally block...
Joined: Aug 31, 2004
Sep 23, 2006 22:55:00
What happens when you try it?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award."
Joined: Mar 10, 2006
Sep 26, 2006 23:30:00
System.exit(0); will shut down JVM so it won't come in finally block.
Joined: Feb 02, 2006
Sep 27, 2006 06:24:00
System.exit() is a exception where finally block is not executed.
subject: Execution of finally
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014