code: public static Character toCharacter(Object o, Character defaultValue) {
  	if (o instanceof Character) return (Character) o;
  	if (defaultValue != null) return new Character(toCharValue(o, defaultValue.charValue()));
  
  	char res = toCharValue(o, Character.MIN_VALUE);
  	if (res == Character.MIN_VALUE) return defaultValue;
  	return new Character(res);
      }
docs: cast a Object to a Character Object(reference type)
  
  @param o Object to cast
  @param defaultValue
  @return casted Character Object