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;
}

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 ; }
gets a double out of a properties object . returns the default value if something goes wrong .
