code: static <T> String join(Iterable<T> elems, String delim) {
          if (elems == null)
              return "";
          StringBuilder result = new StringBuilder();
          for (T elem : elems)
              result.append(elem).append(delim);
          if (result.length() > 0)
              result.setLength(result.length() - delim.length());
          return result.toString();
      }
docs: Join several objects into a string