public static String join(Object[] array,String separator){
  if (array == null) {
    return null;
  }
  if (array.length == 0) {
    return StringPool.EMPTY;
  }
  if (array.length == 1) {
    return String.valueOf(array[0]);
  }
  final StringBuilder sb=new StringBuilder(array.length * 16);
  for (int i=0; i < array.length; i++) {
    if (i > 0) {
      sb.append(separator);
    }
    sb.append(array[i]);
  }
  return sb.toString();
}

public static String join ( Object [ ] array , String separator ) { if ( array == null ) { return null ; } if ( array . length == 0 ) { return StringPool . EMPTY ; } if ( array . length == 1 ) { return String . valueOf ( array [ 0 ] ) ; } final StringBuilder sb = new StringBuilder ( array . length * 16 ) ; for ( int i = 0 ; i < array . length ; i ++ ) { if ( i > 0 ) { sb . append ( separator ) ; } sb . append ( array [ i ] ) ; } return sb . toString ( ) ; }
joins an array of objects into one string with separator .
