When you allocate memory for a multidimensional array, you need only specify the memory for the first (leftmost) dimension.
You can allocate the remaining dimensions separately.
In Java, array length of each array in a multidimensional array is under your control.
Example