code: public static String join2(final Collection<String> list, final String delimiter) {
      final StringBuffer buffer = new StringBuffer();
      boolean first = true;
      for (final String str : list) {
        if (!first) {
          buffer.append(delimiter);
        }
        buffer.append(str);
        first = false;
  
      }
  
      return buffer.toString();
    }
docs: Don't bother to add delimiter for last element
  
  @return String - elements in the list separated by delimiter