code: public static String join (Iterable<?> items, String sep)
      {
          Iterator<?> i = items.iterator();
          if (!i.hasNext()) {
              return "";
          }
          StringBuilder buf = new StringBuilder(String.valueOf(i.next()));
          while (i.hasNext()) {
              buf.append(sep).append(i.next());
          }
          return buf.toString();
      }
docs: Joins the given sequence of strings, which the given separator string between each
  consecutive pair.