I am trying to convert A List<> of int arrays to a 2D array.
The shape of List<int[]> is List[Array1{x1,y1}, Array2{x2,y2}, ..., Array2{xn,yn}].
I want to convert it to a 2D Array, of type int[][]
I found the syntax for it to be: (Assume name of list to be ans)
ans.toArray(new int[0][]);
My question is why are we using new int[0][]. Why have the no. of rows been declared as 0?