title: Is there a direct equivalent in Java for Python's str.join?
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/63150/whats-the-best-way-to-build-a-string-of-delimited-items-in-java">What&rsquo;s the best way to build a string of delimited items in Java?</a><br>
    <a href="https://stackoverflow.com/questions/1751844/java-convert-liststring-to-a-joind-string">Java: convert List&lt;String&gt; to a join()d string</a>  </p>
  </blockquote>
  
  
  
  <p>In Java, given a collection, getting the iterator and doing a separate case for the first (or last) element and the rest to get a comma separated string seems quite dull, is there something like <code>str.join</code> in Python?</p>
  
  <p>Extra clarification for avoiding it being closed as duplicate: I'd rather not use external libraries like Apache Commons.</p>
  
  <p>Thanks!</p>
  
  <h2>update a few years after...</h2>
  
  <p><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#join-java.lang.CharSequence-java.lang.CharSequence...-" rel="noreferrer">Java 8 came to the rescue</a></p>