Possible Duplicate:
&& (AND) and || (OR) in Java IF statements
This is a question I should have probably known the answer to years ago but if I am writing an if statement in Java that has something like if(x != null && y == null && x.equals(z)) is this safe? I assume that the if statement conditions are interpreted from left to right so checking if x != null to begin with will assure no null pointer exception is thrown (at least by x) on the x.equals(z) part of the condition. Is this accurate?