Here you can find the source of toDouble(String str)
public static double toDouble(String str)
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { public static double toDouble(String str) { return Double.parseDouble(str); }//w w w. j a va2 s . c om public static double toDouble(String str, double val) { return str != null ? Double.parseDouble(str) : val; } }