I have one question.
In Java I have an ArrayList containing an ArrayList with double-values. From this I want to make an double[][] array.
I know how to make it with an 1D- Array via the method 'toArray' but in this case I'm not sure how to do ist and always get an error message in my code.
My Aktuell Code is:
double[][] test = new double[Data.getArrayList().size()][Data.getArrayList().size()];
double[][] array = Data.getArrayList().toArray(test);
Where Data is my ArrayList of ArrayLists.
Data. If it were anArrayListthanData.getArrayList()would be a compiler error.Data.getArrayListI get out the data asArrayList<ArrayList<Double>>. But this shouldn't be the Problem.