Which three of the following are valid Java operators that can be used with primitive numeric types?
& is a bitwise AND operator that works on integer types (byte, short, int, long, char).
Why this answer
Options A, B, and C are correct because &, ^, and | are bitwise operators that can be applied to integral primitive numeric types (byte, short, int, long, char). They operate on the binary representations of these types. Note that these operators are not applicable to floating-point types (float, double).
Options D and E (&&, ||) are logical operators that work only with boolean operands, not numeric types.
Exam trap
Oracle often tests the distinction between short-circuit logical operators (&&, ||) and bitwise operators (&, |, ^), trapping candidates who assume that && and || can be used with numeric types because they look similar to & and |.