Lecture 10
14
array summary
•declare:  Type[ ] myArray; // Type is class name,                      // or primitive
•create:    myArray = new Type[size]; // int size
•put:        myArray[position] = …; // int position
•get:         Type x = myArray[position];                 myArray[position].message();
•length:    myArray.length;    // final public field
•range:     0,1,…, myArray.length-1
•read short self documenting program Array.java