Monday, April 30, 2007

What can prevent the execution of the code in finally block?

-Use of System.exit()
-The death of thread
-Turning off the power to CPU
-An exception arising in the finally block itself


Anonymous said...

Or a return statement in the try or catch block.

Anonymous said...

Even if return is there in Try or Catch, the finally will still be executed...


Interview Questions On Java,Java EE Copyright © 2017. Reads: best tracker