title: java: Exceptions: always reach finally?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/464098/does-a-finally-block-always-run">Does a finally block always run?</a>  </p>
  </blockquote>
  
  
  
  <p>let's imagine the following scenario:</p>
  
  <pre><code>public void myMethod() throws MyException
    try
    {
       // do something
       // an Exception (for example an individual written MyException which extends 
       // "Exception" is thrown here
    }
    catch (OtherException e)
    {
      // do something
    }
    finally 
    {
      // do something else
    }
  }
  </code></pre>
  
  <p>In case "MyException" is thrown in the try block and would not be catched - they finally block would be reached nonetheless, correct?</p>
  
  <p>What if it would be an Runtime Exception, which would be thrown? Would the finally block be reached?</p>
  
  <p>Is there any case where a finally block won't be reached?</p>
  
  <p>Thanks for an answer :-)</p>