In this statement the expression should have a boolean type. It is evaluated first. If the expression evaluates to true, then the first group of statements (known as the then clause) are evaluated. If the expression evaluates to false, the group of statements following else (the else clause) are evaluated.
This form evaluates the expression, and then returns the value of the expression as the result of the method in which it is contained.
This form causes the method to cease evaluation, without producing a value. Should be used in conjunction with void for the MethodReturn.
This statement groups the sequence of statements together, commonly called a block. The statements evaluate sequentially.
May only appear as the first statement of a constructor. Calls the constructor for the parent class using the given expressions as arguments. Expressions are evaluated left to right.
Creates a local variable Id within a method body or a block statement; it is not visible outside the block or method, or to statements the preceed the declaration. The variable must be initialized prior to use.
Type Id = Expression ;
Creates a local variable Id within a method body or a block statement.
This set of expressions can be used in a statement position, provided they are followed by ’;’.