Question: Which of the following statements are true? Select the three correct answers. (a) The condition in an if statement can have method calls. (b) If
Which of the following statements are true?
Select the three correct answers.
(a) The condition in an if statement can have method calls.
(b) If a and b are of type boolean or Boolean, the expression (a =
b) can be the condition of an if statement.
(c) An if statement can have either an if clause or an else clause.
(d) The statement if (false) ; else ; is illegal.
(e) Only expressions that evaluate or can be unboxed to a boolean value can be used as the condition in an if statement.
Step by Step Solution
3.41 Rating (151 Votes )
There are 3 Steps involved in it
a b and e The condition of an if statement can be any expression includ... View full answer
Get step-by-step solutions from verified subject matter experts
