title: Java- creating multiple ResultSets out of same Statement object- will it have any effects?
body: <p>I have a 2 <strong>ResultSet</strong>'s generated from the same <strong>Statement</strong> object. </p>
  
  <p>Code Sample follows:</p>
  
  <pre><code>Connection con            = null;
  Statement  stmt           = null;
  ResultSet rs = null;
  
  con = DBAccess.getConnection();
  stmt = con.createStatement();
  
  rs = stmt.executeQuery(Query1);
  // operate on the resultset
  
  rs = stmt.executeQuery(Query2);   // Is it legal and do not have side-effects?
  // operate on the resultset
  
  // close everythings (Resultset, Statement, Connection)
  </code></pre>
  
  <p>I checked it to work well. My doubt is will it have any side effects ? </p>