Placing a List in the parameters of another List in java
<p>Sorry if the title is unclear, but I wasn't exactly sure how to describe this in that little amount of words. Okay, so suppose we have this declaration: </p>

<pre><code>ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
//add items to list
Set&lt;String&gt; set = new TreeSet&lt;String&gt;(list);
</code></pre>

<p>Now, from what I understand, <code>set</code> will receive the data from <code>list</code> and sort them because that's what TreeSets do. However, on the oracle website, I don't see any constructor in the HashSet class that takes a List as a parameter. So, I don't understand why this works if there is no defined constructor to accept a List as a parameter.</p>
