Arrays: built-in construct for dealing with lists of things
Constructing an array -- note the square brackets:
int[] numberList = new int[10];
Fish[] listOfFish = new Fish[numFish];
Accessing elements in the array: theArray[indexOfElement]
Indices range from 0 to N - 1.
Examples:
System.out.println(numberList[0]);
System.out.println(numberList[9]);
System.out.println(numberList[i]);
listOfFish[fishNum].moveForward();
Referring to the length of an array -- note lack of parens:
numberList.length
We often use loops to step through an array.
for (int i=0; i<numberList.length; i++)
numberList[i] = 0;