Originally posted by marc weber:
Keep in mind that a 2-d array does not need to be "rectangular," and could contain arrays of different lengths.
For example, if "myArray" represents a 2-d array, then the array at myArray[0] is not necessarily the same length as the array at myArray[1]...
int[][] myArray = { {1}, {2, 3, 4}, {5, 6} };
Which also means that :
int[][] myArray = new int[3][];
myArray[0] = new int[1];
myArray[1] = new int[3];
myArray[2] = new int[2];
And
you should not forget initialze the arrays