How can I find that the ResultSet
, that I have got by querying a database, is empty or not?
Immediately after your execute statement you can have an if statement. For example
ResultSet rs = statement.execute();
if (!rs.next()){
//ResultSet is empty
}