title: Java ResultSet how to check if there are any results
body: <p><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html" rel="noreferrer">Resultset</a> has no method for hasNext. I want to check if the resultSet has any value</p>
  
  <p>is this the correct way </p>
  
  <pre><code>if (!resultSet.next() ) {
      System.out.println("no data");
  } 
  </code></pre>