code: public static String join(Iterable<?> objects, String delimiter) throws ConcurrentModificationException {
  		int delimiterLength = delimiter.length();
  		// Find total length
  		int totalLength = 0;
  		boolean didOne = false;
  		for(Object obj : objects) {
  			if(didOne) totalLength += delimiterLength;
  			else didOne = true;
  			totalLength += String.valueOf(obj).length();
  		}
  		// Build result
  		StringBuilder sb = new StringBuilder(totalLength);
  		didOne = false;
  		for(Object obj : objects) {
  			if(didOne) sb.append(delimiter);
  			else didOne = true;
  			sb.append(obj);
  		}
  		if(totalLength!=sb.length()) throw new ConcurrentModificationException();
  		return sb.toString();
  	}
docs: Joins the string representation of objects on the provided delimiter.
  The iteration will be performed twice.  Once to compute the total length
  of the resulting string, and the second to build the result.
  
  @throws ConcurrentModificationException if iteration is not consistent between passes
  
  @see  #join(java.lang.Iterable, java.lang.String, java.lang.Appendable)
  @see  #join(java.lang.Object[], java.lang.String)