public boolean getBoolean ( String key , boolean defaultValue ) { addToDefaults ( key , Boolean . toString ( defaultValue ) ) ; String value = get ( key ) ; if ( value == null ) { return defaultValue ; } else { return Boolean . valueOf ( value ) ; } }
Returns the Boolean value for the given key . If the key does not exists it will return the default value given . The method returns whether the string of the value is true ignoring cases .