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

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 ) ; }
cast a object to a character object ( reference type )
