I have a 2D array where no. of rows is 1 and no. of columns is > 1.
double[][] T = new double[1][24];
System.out.println(T[1].length);
But when i print the length of the columns, its says the index is out of bounds.
but when i print the following,
System.out.println(T[0].length);
I get the result as 24. But shouldn't T[0] should be equal to 1 and T[1] be equal to 24? Why am I getting this error? I suppose, java considers the above array as 1D array since it has only one row. but I need it to be a 2D array for further processes. Could anyone please help?