< Java Programming < Keywords 
      if is a Java keyword. It starts a branching statement.
The general syntax of a if, using Extended Backus-Naur Form, is
branching-statement ::=ifcondition-clause single-statement | block-statement [elsesingle-statement | block-statement ] condition-clause ::=(Boolean Expression)single-statement ::= Statement block-statement ::={Statement [ Statements ]}
For example:
|  | if ( boolean Expression )
{
   System.out.println("'True' statement block");
}
else
{
   System.out.println("'False' statement block");
}
 | 
See also:
    This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.