0

return listofarray.toArray(new int[0][ ])

Want to convert list of array into 2d array but didn't understand this code. Other way was also return listofarray.toArray(new int[listofarray.size()][ ]) ; Both code returns 2d array but how?

10th Oct 2020, 3:11 PM
R_N
2 Answers
+ 1
Please share your code. It is difficult to understand your problem from what you have provided.
10th Oct 2020, 4:16 PM
Avinesh
Avinesh - avatar
0
I want to convert list of array into 2d array and above was the solution. But I couldn't get it. List<int[]> listofarray=new ArrayList<>() ; into int[ ][ ]
11th Oct 2020, 4:25 AM
R_N