Here you can find the source of toDoubleArray(List
public static double[] toDoubleArray(List<Double> list)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.List; public class Main { public static double[] toDoubleArray(List<Double> list) { double[] array = new double[list.size()]; Iterator<Double> ints = list.iterator(); int idx = 0; while (ints.hasNext()) { Double value = ints.next(); array[idx++] = value.doubleValue(); }//from w ww . j a v a2 s.c o m return array; } }