Thursday, September 20, 2007

Simple Bidimensional Array sample

//Bidimensional Array

public class BidimensionalArrayTest {
public static void main (String args[]) {
int a[][]={{1, 2, 3, 4},
{4, 5, 6, 7}};

for (int row = 0; row < a.length; row++) {
for (int column = 0; column < a[row].length; column++) {
System.out.print("" + row + "," + column + " ");
}
System.out.println("");
}
}
}

No comments: