Here you can find the source of toDoubleArray(List
public static double[] toDoubleArray(List<String> stringArray)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static double[] toDoubleArray(List<String> stringArray) { if (stringArray == null) { return null; }//from ww w .j a v a 2 s.c om double[] result = new double[stringArray.size()]; for (int i = 0; i < stringArray.size(); i++) { try { if (stringArray.get(i) != null) { result[i] = Double.parseDouble(stringArray.get(i)); } else { result[i] = 0.0; } } catch (Exception e) { e.printStackTrace(); result[i] = 0; } } return result; } }