title: NullPointerException in closing jdbc connection
body: <p>While I am trying to close the JDBC it is throwing <code>NullPointerException</code>.</p>
  
  <pre><code>public void getDBConnection() throws SQLException {
      Driver driver = new Driver();
      DriverManager.registerDriver(driver);
      conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root123");
  }
  
  public void closeDB() throws SQLException {
      conn.close();
  }
  </code></pre>