title: A difference in style: IDictionary vs Dictionary
body: <p>I have a friend who's just getting into .NET development after developing in Java for ages and, after looking at some of his code I notice that he's doing the following quite often:</p>
  
  <pre><code>IDictionary&lt;string, MyClass&gt; dictionary = new Dictionary&lt;string, MyClass&gt;();
  </code></pre>
  
  <p>He's declaring dictionary as the Interface rather than the Class. Typically I would do the following:</p>
  
  <pre><code>Dictionary&lt;string, MyClass&gt; dictionary = new Dictionary&lt;string, MyClass&gt;();
  </code></pre>
  
  <p>I'd only use the IDictionary interface when it's needed (say, for example to pass the dictionary to a method that accepts an IDictionary interface).</p>
  
  <p>My question is: are there any merits to his way of doing things? Is this a common practice in Java?</p>