title: ArrayList declaration
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/12321177/arraylist-declaration-java">ArrayList declaration Java</a>  </p>
  </blockquote>
  
  
  
  <p>In Java, why is an ArrayList often declared using a List?</p>
  
  <pre><code>List&lt;String&gt; strList1 = new ArrayList&lt;String&gt;();
  ArrayList&lt;String&gt; strList2 = new ArrayList&lt;String&gt;();
  </code></pre>
  
  <p>I am not able to understand the difference between these two. Is one better than the other? or have a specific use?</p>