/**
* Iterating through arrays.
*
*
Elie Zananiri
* ACAD Processing workshop
* April 2008
*/
// create an array with 10x6 = 60 ints
int[][] numbers = new int[10][6];
// writing to an array:
// fill the array with numbers from 1 to 60
for (int i=0; i < 10; i++) {
for (int j=0; j < 6; j++) {
numbers[i][j] = i*6+j+1;
}
}
// reading from an array:
// print the contents of each element to the console window
for (int i=0; i < 10; i++) {
for (int j=0; j < 6; j++) {
println(numbers[i][j]);
}
}