The exam objectives specify six "logical" operators (&, |, ^, !, &&, and ||).
Some Oracle documentation uses other terminology for these operators, but for our purposes and in the exam objectives, these six are the logical operators.
Of the six logical operators listed above, three of them (&, |, and ^) can also be used as "bitwise" operators. Bitwise operators
were included in previous versions of the exam, but they are NOT on the Java 6 or Java 7 exam.
Here are several legal statements that use bitwise operators:
byte b1 = 6 & 8;
byte b2 = 7 | 9;
byte b3 = 5 ^ 4;
System.out.println(b1 + " " + b2 + " " + b3);
Bitwise operators compare two variables bit-by-bit and return a variable whose bits have been set based on whether the two variables being compared had respective bits that were either both "on" (&), one or the other "on"
(|), or exactly one "on" (^). By the way, when we run the preceding code, we get