What's the use of specifying the type of a HashSet when working with the generic Set interface?
<p>If you instantiate a new HashSet, you usually use the Set interface to work with it afterwards. Just like</p>

<pre><code>Set&lt;T&gt; set = new HashSet();
</code></pre>

<p>So what is the use of specifying the type of the HashSet explicitly, too? For example:</p>

<pre><code>Set&lt;T&gt; set = new HashSet&lt;T&gt;();
</code></pre>

<p>I've seen it in quite a couple of books, but I can't think of any use at all. If you need access to the set, you'll work with the interface (which is already parameterized) anyway.</p>
