L
Leihcim
Hi,
If you have multiple tests in an if statement, is the order in which they
are evaluated guaranteed from left to right ? I.e. I want to do this:
ResultSet rs = // get result set.
if(rs!=null && rs.next()) {
// do something
}
The right test could throw an exception if it is evaluated first, hence
the left test. It works on my system, but is it guaranteed ?
Thanks, Michiel.
If you have multiple tests in an if statement, is the order in which they
are evaluated guaranteed from left to right ? I.e. I want to do this:
ResultSet rs = // get result set.
if(rs!=null && rs.next()) {
// do something
}
The right test could throw an exception if it is evaluated first, hence
the left test. It works on my system, but is it guaranteed ?
Thanks, Michiel.