code: public static String join(Collection<String> s, String delimiter, boolean doQuote) {
          StringBuffer buffer = new StringBuffer();
          Iterator<String> iter = s.iterator();
          while (iter.hasNext()) {
              if (doQuote) {
                  buffer.append("\"" + iter.next() + "\"");
              } else {
                  buffer.append(iter.next());
              }
              if (iter.hasNext()) {
                  buffer.append(delimiter);
              }
          }
          return buffer.toString();
      }
docs: Join the Collection of Strings using the specified delimter and optionally quoting each
  
  @param s
  The String collection
  @param delimiter
  the delimiter String
  @param doQuote
  whether or not to quote the Strings
  @return The joined String