code: public static String join(String delimiter, String... collection){
          if (collection.length == 0) return "";
          
          StringJoiner sj = new StringJoiner(delimiter);
          for (String string : collection) {
              sj.add(string);
          }
          return sj.toString();
      }
docs: Joins the items in collection with a delimiter.
  
  @param collection - collection of items to join.
  @param delimiter delimiter to insert between elements of collection.
  @return string with collection elements separated by delimiter. There is no trailing delimiter in the string.