code: public static String join(Collection strings, String delimiter) {
          StringBuilder builder = new StringBuilder();
          Iterator<String> iter = strings.iterator();
          while (iter.hasNext()) {
              builder.append(iter.next());
              if (!iter.hasNext()) {
                  break;
              }
              builder.append(delimiter);
          }
          return builder.toString();
      }
docs: Joins a collection of string with a given delimiter.
  
  @param strings The collection of strings to join.
  @param delimiter The delimiter to use to join them.
  @return The string built by joining the string with the delimiter.