title: Close connection and statement finally
body: <p>Which is better for finally block:</p>
  
  <pre><code>finally {
          try {
              con.close();
              stat.close();
          } catch (SQLException sqlee) {
              sqlee.printStackTrace();
          }
      }
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>finally {
          try {
              if (con != null) {
                  con.close();
              }
              if (stat != null) {
                  stat.close();
              }
          } catch (SQLException sqlee) {
              sqlee.printStackTrace();
          }
      }
  </code></pre>