What is the difference between creating instance by extending superclass and by extending its own class?
<p>For example: </p>

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

<p>vs</p>

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

<p>What is the exact difference between these two?</p>

<p>When should we use the first one and when should we use the second?</p>
