I have a multidimensional array where the second dimension is not always the same length.
Is it possible to initialize an array where you first create the first part like this
I am using this array to define the length of each row in the matrix.
int[] config = {4,4,4,3,2,4};
boolean[][] array = new boolean[config.lenght][];
and then after loop over the array and create the subarrays with the desired length?
for(int i = 0; i<config.length; i++)
boolean[i][] = new boolean[config[i]];
PS: I will not use ArrayList