Another thing is that && and || have lower precedences than & ^ (exclusive-or) and |. The single-stroke operators & ^ and | are overloaded; they are applied to integer numbers and secondarily also applied to Boolean values. Boolean values include un-boxed java.lang.Boolean objects and
boolean primitives.
Note the Java™ Tutorials refer to && as
conditional and on one page, which is correct, and
logical and, which may be incorrect, on another page.