47.3k views
5 votes
Identify the false statement.

a. In a Java if statement, the keyword if is followed by a Boolean expression within parentheses.
b. When determining equivalency in Java, you use a double equal sign.
c. In a Java if statement, a semicolon follows the Boolean expression.

1 Answer

2 votes

Final answer:

The false statement is option c. In a Java if statement, a semicolon does not follow the Boolean expression.

Step-by-step explanation:

The false statement in the given options is option c. In a Java if statement, a semicolon does not follow the Boolean expression.

The correct syntax for an if statement in Java is:

if (boolean_expression) {
// code to execute if the condition is true
} else {
// code to execute if the condition is false
}

User Tymik
by
7.8k points