I have the following code to get and return records count from the database and assign it into the object.
rs = stmt.executeQuery( "SELECT COUNT(*) FROM TEST" );
I have the following code to check whether records is found:
if (rs.next() && rs.getString( 1 ).equals( "1" )) {
logger.info( "DID Find Records !!! " );
} else {
logger.info( "DID NOT Find Records !!! " );
}
How can I check return records is more then 0 in this case?