title: What are the List or ArrayList declaration differences in Java?
body: <p>I am new to Java.
  I want to know the difference between: </p>
  
  <pre><code>List&lt; String &gt; list = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>and</p>
  
  <pre><code>ArrayList&lt; String &gt; list = new ArrayList&lt;String&gt;();
  </code></pre>
  
  <p>and </p>
  
  <pre><code>ArrayList&lt; String &gt; list = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>Thanks</p>