The way you should look at it is that you actually make an array of an array of ints.
For example you could initialize it like this:
int[][] array = {
{1, 2, 3, 4}, // This is the first array in the multidimensional array
{5, 6, 7, 8}, // This is the second array in the multidimensional array
{9, 10, 11, 12} // This is the third array in the multidimensional array
};
Note that each of these individual arrays inside the multidimensional array has length 4.
So when you ask the length like this:
array.length // = 3
what Java does is give you the number of int[] in the array.
Now every array in this array has length 4, hence:
array[0].length // = 4
Also let's say you wanted to access the element with value 7.
This element can be found in the second array on the third place.
Since Java indexing starts at 0, you can access that element as follows.
array[1][2] // value of this element is 7
You can read more here https://www.programiz.com/java-programming/multidimensional-array.
Multidimensional arrays are hard in the beginning, but once you get them, you will use them often.
array.lengthis the number of rows andarray[i].lengththe number of columns of rowi.arrayis anint[][](or I should say an array ofint[],array[0]is anint[].