► |  | 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.4`` Field

- Type Id ;

  Creates a field, bound to Id, that can be used within the current class, or on instances of the current class using an expression. This field will have the declared type and must be initialized to its value using an Init in the constructor.

- Type Id = Expression ;

  Creates a field, bound to Id, that can be used within the current class, or on instances of the current class using an expression. This field will have the declared type and the value of the evaluated Expression. Expression may not refer to other fields in the current class.

top← prev up next →