Sometimes you have a collection of values that you want to give one name. One way to do that in Java is to have an array. |
To create an array like this, you must say what type the elements are (they must all be the same type) and how many there will be: |
An array has a set of positions to store values. Each position is given an index number: |
int numbers [ ] = new int [ 7 ] ; |
String labels [ ] = new String [ 64 ] ; |
0 1 2 3 4 5 6 |