Which is faster between splitting / joing collection to array or iterating over the collection itself
<p>I have 2 codes tbat do same thing. I am wondering which one will be faster:</p>

<p>1.</p>

<pre><code>import org.apache.commons.collections.CollectionUtils;
String [] htArray = StringUtils.join (CollectionUtils.subtract (
    Arrays.asList ((h + " " + t).split (" ") ),
    Arrays.asList (htSelected.split (" ") ) ), " " ).split (" ");
for (String term: htArray ) {
    ...
}
</code></pre>

<p>2. </p>

<pre><code>import org.apache.commons.collections.CollectionUtils;
ArrayList &lt;String&gt; htList = null;
try {
    htList = (ArrayList &lt;String&gt;) CollectionUtils.subtract (
        Arrays.asList ( (h + " " + t).split (" ") ), 
        Arrays.asList (htSelected.split (" ") ) );
} catch (Exception except) {}

if ( htList != null) {
    for (String term: htList) {
        ...
    }
}
</code></pre>

<p>The 1st one joins a collection then splits the string into an array. The second one casts the collection, does try/catch then adds an 'if'. Which one is optimal?</p>
