Here you can find the source of toDouble(String str)
public static Double toDouble(String str)
//package com.java2s; //License from project: Open Source License public class Main { public static Double toDouble(String str) { Double rtn = null;/* w ww . j a va 2 s.co m*/ if (str != null) { try { rtn = new Double(str); } catch (NumberFormatException e) { rtn = null; } } return rtn; } }