title: Java and generics. Isn't 0 a Number?
body: <p>What is that I'm missing about this snippet of code?</p>
  
  <pre><code>public class Zero&lt;N extends Number&gt; {
    public N zero() {
      return new Integer(0);
    }
  }
  </code></pre>
  
  <p>It says:</p>
  
  <blockquote>
    <p>Type mismatch: cannot convert from Integer to N</p>
  </blockquote>
  
  <p>Thanks!</p>
  
  <p><strong>Update</strong> I've changed the snippet to use an integer. Same thing happens. And it happens even when creating an anonymous subclass of <code>Number</code>. Could it be Eclipse that is faulty about this?</p>