I have an Arraylist that I want to convert it into an array. I am using this:
double[] array = new double[list.size()];
double [] array = list.toArray(new double[list.size()]);
but, it does not work. Any idea how I can fix it? Thanks in advance. It seems it returns object.