Syntax:
if ( boolean-expression ) statement

if ( boolean-expression ) statement else statement

In the above syntax description, the single statement may be replaced with multiple statements by enclosing those statements in a statement block using braces:

{ statement1; statement2; statement3; }

Description:
The if statement conditionally executes one or more statements. If the boolean-expression evaluates to true, then the statement following the closing parenthesis is executed. If the boolean-expression evaluates to false, then the statement following the else is executed (if present). If the boolean-expression evaluates to null, then neither statement is executed.