Multiple choice technology programming languages

The & and | operators always evaluate

  1. Evalauate on the first operand

  2. Evaluate on both operands

  3. Does nt evaluate the right operand if the left operand is true

  4. to true if both operands are true

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The bitwise AND (&) and bitwise OR (|) operators in Java ALWAYS evaluate both operands - they do not short-circuit. This is different from logical AND (&&) and logical OR (||) which short-circuit (skip right operand if left operand determines result). Option A is incorrect because both operands are evaluated. Option C describes short-circuit behavior which applies to &&, ||, not &, |.