title: Create a zero value of a generic Number subclass
body: <p>How can I generically create a zero of an arbitrary numeric type?</p>
  
  <p>Here's a toy example: a function that converts a null number into zero.</p>
  
  <pre><code>static &lt;T extends Number&gt; T zeroIfNull(T value) {
      return value == null ? 0 : value;
  }
  </code></pre>
  
  <p>This doesn't compile because the literal zero is of type <code>int</code>, and I need to convert that to type <code>T</code>.</p>
  
  <p>Is it possible to do this at all?</p>