When/why to use/define an interface
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2586389/when-best-to-use-an-interface-in-java">When best to use an interface in java</a>  </p>
</blockquote>



<p>Hi,</p>

<p>When defining a class should I always define a corresponding interface ?</p>

<p>What is the advantage of </p>

<pre><code>List list = new ArrayList();
</code></pre>

<p>Why not just - </p>

<pre><code>ArrayList arrayList = new ArrayList();
</code></pre>

<p>Thanks</p>
