Here you can find the source of toDouble(final String argStr)
public static double toDouble(final String argStr)
//package com.java2s; //License from project: Apache License public class Main { public static double toDouble(final String argStr) { double ret = Double.NaN; try {//from w w w .ja va2s . co m ret = Double.valueOf(argStr); } catch (NumberFormatException nfE) { // consumed } return ret; } }