Java Programming/Keywords/else
Tools
General
Sister projects
In other projects
else is a Java keyword. It is an optional part of a branching statement. It starts the 'false' statement block.
The general syntax of aif, usingExtended Backus-Naur Form, is
branching-statement ::=ifcondition-clausesingle-statement |block-statement [elsesingle-statement |block-statement ] condition-clause ::=(Boolean Expression)single-statement ::=Statementblock-statement ::={Statement [Statement ]}
For example:
if(expression){System.out.println("'True' statement block");}else{System.out.println("'False' statement block");} |
See also: