Java OCA OCP Practice Question 252

Question

When is x & y an int? (Choose one).

  • A. Always
  • B. Sometimes
  • C. When neither x nor y is a float, a long, or a double


B.

Note

The result is an int whenever the operands are bytes, shorts, chars, or ints.

C is wrong when both operands are booleans.




PreviousNext

Related