I have following code
if (rs != null)
{
out.println("result set has got something");
while (rs.next())
{
//I am processing result set now
}
}
else
{
out.println("result set is empty");
}
Even though rs is null it is printing “resultset has got something”. Why is it happening like that and how can I check for empty result set?
You could check it with: