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?
2 Réponses
+ 1
Please share your code. It is difficult to understand your problem from what you have provided.
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[ ][ ]