Check out example codes for "how to check if rs next is null". It will help you in understanding the concepts better.

Code Example 1

if (rs.next() == false) {
        System.out.println("ResultSet in empty in Java");
      } else {

        do {
          String data = rs.getString("emp_name");
          System.out.println(data);
        } while (rs.next());
      }

Learn ReactJs, React Native from akashmittal.com