Here you can find the source of tryParse(String s, double d)
public static double tryParse(String s, double d)
//package com.java2s; // The license under which this software is released can be accessed at: public class Main { public static int tryParse(String s, int i) { try {/*from w ww . j a v a2 s . c o m*/ return Integer.parseInt(s); } catch (Exception e) { return i; } } public static double tryParse(String s, double d) { try { return Double.parseDouble(s); } catch (Exception e) { return d; } } }