Java tutorial
//package com.java2s; public class Main { public static double parseDouble(String string, double defaultValue) { double rc = defaultValue; try { if (string != null) rc = Double.parseDouble(string.trim()); } catch (Throwable localThrowable) { } return rc; } }