An if
statement contains a Boolean
expression, in parentheses, followed by an embedded statement:
if (Boolean expression) embedded statement
If the Boolean expression of an if
statement evaluates to
true
, Java executes the embedded statement; if the Boolean
expression evaluates to false
, Java skips the embedded statement.