title: How can Reuse executeQuery in the session one
body: <p>I doing BDD with cucumber:</p>
  
  <p>Step 1: run excecuteQuery -> show value column 3 in DB correct (example:1.000)</p>
  
  <p>Step 2: run API plus amount into DB (example: 2.000)</p>
  
  <p>Step 3: Re-excecuteQuery => value show incorrect (expected :3.000)</p>
  
  <pre><code>public int variableTotalAmount() { 
      MysqlConnect mysqlConnect = new MysqlConnect(); 
      int amountVariable = 0; 
      String sql = "sql"; 
      try { 
          Statement stmt = mysqlConnect.connect().createStatement(); 
          ResultSet rs = stmt.executeQuery(sql); 
          while (rs.next()) { 
              amountVariable = rs.getInt(3); 
          } 
      } 
      catch (SQLException e) { 
          e.printStackTrace(); 
      } 
      finally {
          mysqlConnect.disconnect(); 
      } 
      return amountVariable; 
  } 
  </code></pre>