Here you can find the source of toDoubleArray(String value)
public static double[] toDoubleArray(String value)
//package com.java2s; //License from project: Open Source License public class Main { public static double[] toDoubleArray(String value) { String[] values = value.split("\\s"); double[] array = new double[values.length]; for (int i = 0; i < values.length; i++) { values[i] = values[i].trim(); if (values[i].length() > 0) { array[i] = Double.valueOf(values[i]); }//from w w w . j a v a2 s. com } return array; } public static double[] toDoubleArray(Double[] array) { double[] result = new double[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i].doubleValue(); } return result; } }