Here you can find the source of tryParseDouble(String value)
protected static double tryParseDouble(String value)
//package com.java2s; /*/*from w w w. ja v a2s .c o m*/ * @author ucchy * @license LGPLv3 * @copyright Copyright ucchy 2015 */ public class Main { protected static double tryParseDouble(String value) { try { return Double.parseDouble(value); } catch (NumberFormatException e) { return -1; } } }