Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
If you’ve studied this chapter diligently, you should have a firm grasp on Java operators, and you should understand what equality means when tested with the == operator. Let’s review the highlights of what you’ve learned in this chapter.
The logical operators (&&, ||, &, |, and ^) can be used only to evaluate two boolean expressions. The difference between && and & is that the && operator won’t bother testing the right operand if the left evaluates to false, because the result of the && expression can never be true. The difference between || and | is that the || operator won’t bother testing the right operand if the left evaluates to true, because the result is already known to be true at that point.