I need to convert my List:
List<Double> listFoo = new LinkedList<Double>();
to a array of double. So I tried:
double[] foo = listFoo.toArray();
But I get the error:
Type mismatch: cannot convert from Object[] to double[]
How can I avoid this? I could Iterate over the list and create the array step by step, but I don't want to do it this way.