posted 23 years ago
hi,
this is what you could do to store any kind of objects. you can adapt it to your needs.
Object[][] matrix = new Object[3][4];
this creates an two dimensional array:
[0/0][0/1][0/2][0/3]
[1/0][1/1][1/2][1/3]
[2/0][2/1][2/2][2/3]
iterate through the array:
for (int x = 0; x < matrix.length; x++) {
for (int y = 0; y < matrix[x].length; y++) {
// do something.....maybe print it to system out ??
System.out.println(""+matrix[x][y]);
}
}
hope this helps,
pascal