public static String format(String pattern,Long j,String l){
  MessageFormat mf=new MessageFormat("");
  mf.setLocale(getLocale(l));
  mf.applyPattern(pattern);
  String msg=format(mf,j);
  return msg;
}

public static String format ( String pattern , Long j , String l ) { MessageFormat mf = new MessageFormat ( "" ) ; mf . setLocale ( getLocale ( l ) ) ; mf . applyPattern ( pattern ) ; String msg = format ( mf , j ) ; return msg ; }
formats the objects into specified message format .
