Zebra0.com

java ifelseThe syntax of if else

The syntax of if else

The two programs below show the syntax forthe if else statement. If there is just one statment to execute, you can omit the curly braces. However, many programmers always put in the curly braces, even if there is only one statement to execute. The if block is optional