code: public static String join(Object[] objects, String separator) {
        StringBuilder sb = new StringBuilder();
        boolean first = true;
        for (Object o : objects) {
           if (first) {
              first = false;
           } else {
              sb.append(separator);
           }
           sb.append(o.toString());
        }
        return sb.toString();
     }
docs: Join the string representation of an array objects with the given
  separator.
  <p>
  the toString() method is called on each object to get its string
  representation.
  
  @param objects
  The object whose string representation is to be joined.
  @param separator
  The separator to use
  @return The concatenation of the collection of strings with the given
  separator.