difference between new ArrayList<String>() and new ArrayList()
<p>What's the difference between the two declarations?</p>

<pre><code>new ArrayList&lt;String&gt;();
new ArrayList();
</code></pre>

<p>They work, but the second one returns a warning. I don't understand why.</p>

<p>I understand the difference between <code>ArrayList&lt;String&gt; arr</code> and <code>ArrayList arr</code>, the first enables a type checking control. But what about <code>new ArrayList&lt;String&gt;()</code> and <code>new ArrayList()</code>? Is there any difference at implementation level? What do I lose in terms of controls?</p>