public static String format(Object obj){
  if (obj instanceof Number) {
    return format((Number)obj);
  }
 else {
    return obj.toString();
  }
}

public static String format ( Object obj ) { if ( obj instanceof Number ) { return format ( ( Number ) obj ) ; } else { return obj . toString ( ) ; } }
returns a formatted string of the specified object .
