code: public static <T> String join(Iterable<T> iterable, char separator, T... pieces) {
          StringBuilder sb = new StringBuilder();
          for (T element: iterable) {
              sb.append(element != null ? element.toString() : "null").append(separator);
          }
          for (int i = 0; i < pieces.length; ++i) {
              sb.append(pieces[i] != null ? pieces[i].toString() : "null").append(separator);
          }
          if (sb.length() > 0) sb.setLength(sb.length()-1);
          return sb.toString();
      }
docs: Concatenates elements in an Iterable into a single String, with elements separated by the given separator.
  
  @param <T> - the type of the elements in the iterable
  @param iterable - an iterable
  @param separator - a separator character
  @return the string from joining elements in the iterable