Results 1 to 3 of 3
  1. #1
    javaforums1 is offline Member
    Join Date
    Aug 2012
    Posts
    2
    Rep Power
    0

    Cool how can one avoid the execution of code in the finally section of a try catch block?

    how can one avoid the execution of code in the finally section of a try catch block? what kind of statements should go into the finally block?
    Last edited by javaforums1; 08-30-2012 at 05:34 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: how can one avoid the execution of code in the finally section of a try catch blo

    A sledgehammer applied at just the right moment ought to do the trick.

    Why do you think you need to know this? What's the context?

    Also, what's a
    final block
    ?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,802
    Rep Power
    19

    Default Re: how can one avoid the execution of code in the finally section of a try catch blo

    You don't.
    That's the whole point of the finally block...it is guaranteed to execute (barring system exit I think, and things generally outisde the JVMs control).
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Try-catch-(finally?) on reading/writing to files
    By Torchi12 in forum New To Java
    Replies: 8
    Last Post: 11-29-2011, 01:42 PM
  2. try...catch block
    By javaplus in forum New To Java
    Replies: 3
    Last Post: 11-06-2007, 07:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •