A class can have members.
Instance variables can be declared with/without type annotations, and optionally initialized. Uninitialised members have the value of null, unless set to another value by the constructor.
Class variables are declared using the static keyword.
If a method takes no arguments, is fast, returns a value, and doesn't have visible side-effects, thena getter method can be used:
Getters never take arguments, so the parentheses for the (empty) parameter list are omitted both for declaring getters, as above, and for calling them, like so:
There are also setter methods, which must take exactly one argument:
The syntax for calling a setter is the same as variable assignment: