question: public static double doubleFromProperties ( Properties p , String propName , double defaultValue ) { double ret = defaultValue ; String doubleString = p . getProperty ( propName ) ; if ( doubleString != null ) { try { ret = Double . parseDouble ( doubleString . trim ( ) ) ; } catch ( NumberFormatException e ) { ret = defaultValue ; } } return ret ; }
target:  Gets a double out of a properties object. Returns the default value if something goes wrong.