title: How to find out if a Java ResultSet obtained is empty?
body: <pre><code>Class.forName("org.sqlite.JDBC");
  Connection conn =
      DriverManager.getConnection("jdbc:sqlite:userdata.db");
  Statement stat = conn.createStatement();
  
  ResultSet rs = stat.executeQuery("SELECT * from table WHERE is_query_processed = 0;");
  
  int rowcount = rs.getRow(); 
  System.out.println("Row count = "+rowcount); // output 1
  
  rs.first(); // This statement generates an exception
  </code></pre>
  
  <p>Why is it so?</p>