Every if condition and loop test is built from relational comparisons linked by logical operators. Java's short-circuit operators && and || do more than combine booleans—they act as safety guards by stopping early as soon as the outcome is certain.
More lessons in Complete Core Java