12.12.2015 13:28, Suliman пишет:
it's seems that next block is execute even if is rs.next() is false:

writeln("rs.next()-->", rs.next());
if(!rs.next()) //if user do not in DB
{
// is execute even if rs.next() is false
writeln("Executed, but rs.nst was set to false");
}

The output:
rs.next()-->false
Executed, but rs.nst was set to false

Why?



That's right, because you have `if(!rs.next())`. If you change this to `if(rs.next())` this code block won't be executed.

Reply via email to