title: Getting default value for primitive types
body: <p>I have a Java primitive type at hand:</p>
  
  <pre><code>Class&lt;?&gt; c = int.class; // or long.class, or boolean.class
  </code></pre>
  
  <p>I'd like to get a <em>default value</em> for this class -- specifically, the value is assigned to fields of this type if they are not initialized. E.g., <code>0</code> for a number, <code>false</code> for a boolean.</p>
  
  <p>Is there a generic way to do this? I tried this:</p>
  
  <pre><code>c.newInstance()
  </code></pre>
  
  <p>But I'm getting an <code>InstantiationException</code>, and not a default instance.</p>