what happens to finally block in the following cases?

Posted by GK on Stack Overflow See other posts from Stack Overflow or by GK
Published on 2010-04-22T14:59:51Z Indexed on 2010/04/22 15:03 UTC
Read the original article Hit count: 118

Filed under:

if i have a following code

      try{

           //some code

      }catch(Exception e){

           //some code

      }finally{

      }

what happens to the finally block in the following cases

  1. if any checked exceptions happen.

  2. if System.exit() is called.

  3. if any unchecked exceptions happen.

  4. if any errors happen.

© Stack Overflow or respective owner

Related posts about java