Java does not require that subarrays must have the same number of elements. You could easily have a two-d array , which is an array of five arrays. Each contained array could have a different number of elements...
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
From The Java Tutorial (by Sun), under the topic Creating Arrays:
You can also use the newInstance method to create multidimensional arrays. In this case, the parameters of the method are the component type and an array of int types representing the dimensions of the new array.
The next sample program shows how to use newInstance to create multidimensional arrays:
From the topic Retrieving Component Types:
The component type of a multidimensional array is an array. In the next line of code, the component type of the array named matrix is int: int matrix = new int;
[ February 16, 2005: Message edited by: Jeff Bosch ]