It is legal to define empty arrays in general, no matter what it contains. Thus, it is also legal to have an empty array containing non empty arrays.
Mathematically (group theory) speaking, empty arrays are not only legal, but necessary, since they represent the zero (or neutral) element of array concatenation operation. This also makes it useful for programming (see the example below).
In your example you basically probe, if it is ok to access elements of an empty array. This is of course not legal, since there are none. However you can do:
int[][] array = new int[0][1];
System.out.println(array.length);
With reference to my own example above, a more useful case is:
int[][] array1 = new int[1][1];
int[][] array2 = new int[0][1];
array1[0][0] = 1;
int [][] concat = Stream
.concat(Arrays.stream(array1), Arrays.stream(array2))
.toArray(int[][]::new);
System.out.println(Arrays.deepToString(concat));
Thus empty arrays allow to for "good" code, without ifs to exclude, illegal cases, which actually are totally fine.