Java OCA OCP Practice Question 766

Question

Fill in the blanks:

The operators +=, ___ , ___ , ___ , ___ , and ++ are listed in increasing or the same level of operator precedence.

Choose two.

  • A. -, +, =, --
  • B. %, *, /, +
  • C. =, +, /, *
  • D. ^, *, -, ==
  • E. *, /, %, --


C, E.

Note

In Option A, the assignment operator = incorrectly comes after the addition + operator.

In Option B, the addition operator + incorrectly comes after the division / operator.

In Option D, the subtraction operator - incorrectly comes after the multiplication * operator.

This leaves Options C and E as the correct answers.

The modulus operator %, multiplication operator *, and division operator / have the same operator precedence.




PreviousNext

Related