title: Why do we use finally blocks?
body: <p>As far as I can tell, both of the following code snippets will serve the same purpose. Why have <code>finally</code> blocks at all?</p>
  
  <p>Code A:</p>
  
  <pre><code>try { /* Some code */ }
  catch { /* Exception handling code */ }
  finally { /* Cleanup code */ }
  </code></pre>
  
  <p>Code B:</p>
  
  <pre><code>try { /* Some code */ }
  catch { /* Exception handling code */ }
  // Cleanup code
  </code></pre>