Here you can find the source of toDoubleArray(String[] arr)
public static Double[] toDoubleArray(String[] arr)
//package com.java2s; //License from project: Open Source License public class Main { public static Double[] toDoubleArray(String[] arr) { int n = arr.length; Double[] da = new Double[n]; int i = 0; for (String e : arr) { da[i++] = Double.parseDouble(e); }/*from ww w. j a v a 2 s . co m*/ return da; } public static Double[] toDoubleArray(String[] arr, int startFrom) { int n = arr.length; Double[] da = new Double[n - startFrom]; int i = 0; for (int k = startFrom; k < n; k++) { da[i++] = Double.parseDouble(arr[k]); } return da; } public static Double[] toDoubleArray(String[] arr, int startFrom, int to) { int n = arr.length; Double[] da = new Double[to - startFrom + 1]; int i = 0; for (int k = startFrom; k <= to; k++) { da[i++] = Double.parseDouble(arr[k]); } return da; } }