Java: I have try,catch and finally in a java code and I want after try or catch block finally does n

Posted by Sanjeev on Stack Overflow See other posts from Stack Overflow or by Sanjeev
Published on 2010-04-01T08:40:12Z Indexed on 2010/04/01 8:43 UTC
Read the original article Hit count: 261

Filed under:
|

I have following code

public class TEST
{
  public static void main(String arg[]){
    try
    {
      System.out.println("execute try");
      //what should I write hear that finally does not run.
    }
    catch (Exception e){
      System.out.println(e);
    }
    finally{
      System.out.println("execute finally");
    }
  }
}

what should I write in try or catch block that finally does not run. any idea?

© Stack Overflow or respective owner

Related posts about java

Related posts about exception-handling