question: public static double asDouble ( String str , double def ) { try { return Double . parseDouble ( str ) ; } catch ( NumberFormatException e ) { return def ; } }
target:  Parse string to double, if string can't be parsed to double, then it will return given default value.