πŸ“Š JAVA
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) 1, 2 & 3

Explanation: 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.

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.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
300
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Rajeev Malhotra
Publisher
πŸ“ˆ
91%
Success Rate