code: public Object get(String key) {
  		try {
  			return getString(key, null);
  		} catch (ClassCastException e) {
  			try {
  				return getInt(key, 0);
  			} catch (ClassCastException e1) {
  				try {
  					return getLong(key, 0);
  				} catch (ClassCastException e2) {
  					try {
  						return getFloat(key, 0f);
  					} catch (ClassCastException e3) {
  						try {
  							return getBoolean(key, false);
  						} catch (Exception e4) {
  							e.printStackTrace();
  						}
  					}
  
  				}
  
  			}
  		}
  		return null;
  	}
docs: Get the value of the key.
  
  @param key
  The name of the preference to retrieve.
  
  @return value of the preferences