public static String join(CharSequence delimiter,Object[] tokens){
  StringBuilder sb=new StringBuilder();
  boolean firstTime=true;
  for (  Object token : tokens) {
    if (firstTime) {
      firstTime=false;
    }
 else {
      sb.append(delimiter);
    }
    sb.append(token);
  }
  return sb.toString();
}

public static String join ( CharSequence delimiter , Object [ ] tokens ) { StringBuilder sb = new StringBuilder ( ) ; boolean firstTime = true ; for ( Object token : tokens ) { if ( firstTime ) { firstTime = false ; } else { sb . append ( delimiter ) ; } sb . append ( token ) ; } return sb . toString ( ) ; }
returns a string containing the tokens joined by delimiters .
