Java OCA OCP Practice Question 506

Question

Fill in the blanks:

The ____ operator is true if either of the operands are true,

while the ____ operator flips a boolean value.

  • A. + , -
  • B. &&, !
  • C. | , -
  • D. ||, !


D.

Note

The conditional disjunction (OR) || operator is true if either of the operands are true, while the logical complement ( !) operator reverses or flips a boolean value, making Option D the correct answer.

The other options use operators that do not match this description.

Options A and C include operators that can only be applied to numerical values, not boolean ones.




PreviousNext

Related