Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

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

     1. &&

     2. ==

     3. ?:

     4. +=

  2. A.
    3 & 2
    B.
    1 & 4
    C.
    1, 2 & 4
    D.
    1, 2 & 3

    View Answer

    Workspace

    Answer : Option D

    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.


Be The First To Comment