Here you can find the source of toDouble(String str)
public static double toDouble(String str)
//package com.java2s; //License from project: Apache License public class Main { /**/* w w w .ja va 2s . c om*/ * toDouble */ public static double toDouble(String str) { double dval = 0.0; if (str == null || str.equalsIgnoreCase("null") || str.equalsIgnoreCase("") || str.equalsIgnoreCase("0")) return 0.00; // double dval = Double.parseDouble(str.trim()); return dval; } }