Java OCA OCP Practice Question 1752

Question

Which statements are true?.

Select the two correct answers.

  • (a) The remainder operator % can only be used with integral operands.
  • (b) Short-circuit evaluation occurs with boolean logical operators.
  • (c) The arithmetic operators *, /, and % have the same level of precedence.
  • (d) A short value ranges from -128 to +127, inclusive.
  • (e) (+15) is a legal expression.


(c) and (e)

Note

The remainder operator is not limited to integral values, but can also be applied to floating-point operands.

Short-circuit evaluation occurs with the conditional operators (&&, ||).

The operators *, /, and % have the same level of precedence.

The type short has the range -32768 to +32767, inclusive.

(+15) is a legal expression using the unary + operator.




PreviousNext

Related