title: Java try-finally return design question
body: <p>In Java, a try { ... } finally { ... } is executed somewhat unintuitively to me. As illustrated in another question, <a href="https://stackoverflow.com/questions/65035/in-java-does-return-trump-finally">Does finally always execute in Java?</a>, if you have a return statement in the try block, it will be ignored if a finally block is defined. For example, the function</p>
  
  <pre><code>boolean test () {
      try {
          return true;
      }
      finally {
          return false;
      }
  }
  </code></pre>
  
  <p>will always return false. My question: why is this? Is there a particular philosophy behind this design decision made by Java? I appreciate any insight, thank you.</p>
  
  <p>Edit: I'm particularly interested as to 'why' Java thinks it's ok to violate the semantics that I define. If I 'return' in a try block, the method should return right then and there. But the JVM decides to ignore my instruction and return from a subroutine that actually hasn't <em>yet</em> been reached.</p>