Which statements are true?

  1. The conditional expression in an if statement can have method calls.

  2. If a and b are of type boolean, the expression (a = b) can be the conditional expression of an if statement.

  3. The conditional expression in an if statement cannot have method calls.

  4. The statement if (false) ; else ; is illegal.

  5. Only expressions which evaluate to a boolean value can be used as the condition in an if statement.


Correct Option: A,B,E

Find more quizzes: