title: How to get the size of a java.sql.ResultSet?
body: <p>I want to get the size of the <code>ResultSet</code> inside the while loop.</p>
  
  <p>Tried the code below, and I got the results that I want.  But it seems to be messing up with <code>result.next()</code> and the while loop only loops once if I do this.
  What's the proper way of doing this?</p>
  
  <pre><code>result.first();
  while (result.next()){
  
      System.out.println(result.getString(2));
      System.out.println("A. " + result.getString(5) + "\n" + "B. " + result.getString(6) + "\n" + "C. " + result.getString(7) + "\n" + "D. " + result.getString(8));
      System.out.println("Answer: ");
      answer = inputquiz.next();
  
      result.last();
  
      if (answer.equals(result.getString(10))) {
          score++;
          System.out.println(score + "/" + result.getRow());
      } else {
          System.out.println(score + "/" + result.getRow());
      }
  }
  </code></pre>