Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. What should be expression1 evaluate to in using ternary operator as in this line? expression1 ? expression2 : expression3
  2. A.
    Integer
    B.
    Floating "“ point numbers
    C.
    Boolean
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The controlling condition of ternary operator must evaluate to boolean.


Be The First To Comment