Difference between ArrayList<Integer> list = new ArrayList<Integer>(); and Collection<Integer> list1 = new ArrayList<Integer>();
<p>I don't understand difference between those things:</p>

<p><code>ArrayList&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();</code> and <code>Collection&lt;Integer&gt; list1 = new ArrayList&lt;Integer&gt;();</code></p>

<p>Class <code>ArrayList</code> extends class which implements interface <code>Collection</code>, so Class <code>ArrayList</code> implements <code>Collection</code> interface. Maybe <code>list1</code> allows us to use static methods from the <code>Collection</code> interface?</p>
