I have to convert an ArrayList of ArrayList in to Array.
List<List<TockaXY>> clustersPorazdeljeni = new ArrayList<>(centers.size());
I know that is possible to convert a single ArrayList to Array like
TockaXY[] arrayOfClusters = clustersPorazdeljeni.toArray(new TockaXY[centers.size()]);
But these does not convert the nested part. As i understand is now array of ArrayLists. So is it possible to get an Array out of nested ArrayLists?