► |  | How to Design Classes Languages

1 | Professor J Beginner
2 | Professor J Intermediate
3 | Professor J Intermediate + Access
4 | Professor J Advanced
| Index

▼ | 1 | Professor J Beginner

1.1 | import
1.2 | class
1.3 | interface
1.4 | Field
1.5 | Method
1.6 | Constructor
1.7 | Statement
1.8 | Expression

Version: 4.1.4
top← prev up next →

#### 1.7`` Statement

- if (Expression) {Statement} else {Statement}

  In this statement the expression should have a boolean type. It is evaluated first. If the expression evaluates to true, then the first statement (known as the then clause) is evaluated. If the expression evaluates to false, the statement following else (the else clause) is evaluated.

- return Expression ;

  This form evaluates the expression, and then returns the value of the expression as the result of the method in which it is contained.

top← prev up next →