public static String join(String separator,Object[] elements){
  if (elements == null || elements.length == 0) {
    return "";
  }
  return join(separator,Arrays.asList(elements));
}

public static String join ( String separator , Object [ ] elements ) { if ( elements == null || elements . length == 0 ) { return "" ; } return join ( separator , Arrays . asList ( elements ) ) ; }
returns a string containing all elements concatenated by a specified separator .
