Array Types
An array variable must usually be declared and created:
int states[] ; // variable declaration
and then:
states = new int[128] ; // array creation
These can be combined:
int states[] = new int[128] ;
Alternative (better?) syntax for declaration:
The array states can be subscripted by integers from 0 to 127. Subscripts are checked at runtime: states[-1] or states[128] will generate exceptions.
Array length is given by the length instance variable:
int len = states.length ; // assigns len = 128.