R

Rajeev Malhotra • 3.97K Points
Extraordinary

Q. Which of the following operators can operate on a boolean variable?

Code:
   1. &&
   2. ==
   3. ?:
   4. +=
  • (A) 1 & 4
  • (B) 1, 2 & 3
  • (C) 1, 2 & 4
  • (D) 3 & 2
  • Correct Answer - Option(B)
  • Views: 207
  • Filed under category JAVA

Explanation by: Rajeev Malhotra
Operator Short circuit AND, &&, equal to, == , ternary if-then-else, ?:, are boolean logical operators. += is an arithmetic operator it can operate only on numeric values.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics