title: how to find number of records in ResultSet
body: <p>I am getting <code>ResultSet</code> after an Oracle query. when I iterating through the <code>ResultSet</code> its going in infinite loop.</p>
  
  <pre><code>ResultSet rs = (ResultSet) // getting from statement
  while (rs.next()) {
  //
  //
  }
  </code></pre>
  
  <p>this loop is not terminating so I tried finding number of records using <code>rs.getFetchSize()</code> and its returning a value <strong>10</strong>.
  I want to know if this is the correct method to find out number of records in ResultSet and if the count is 10 why is it going in infinite loop.
  Please give your opinion.</p>