if (test expression){
true-block statements;
}
else{
False-block statements;
}
statement-x
Here, if the test expression is true, then the true-block statements will be executed, otherwise the false-block statements will be executed. In either case, either true block or false block statements will be executed, not both. The general form can be shown by the following flowchart.