title: Why do Double.parseDouble(null) and Integer.parseInt(null) throw different exceptions?
body: <p>Why do Double.parseDouble(null) and Integer.parseInt(null) throw different exceptions?</p>
  
  <p>Is this a historical accident or intentional? The documentation clearly states two types of exceptions for <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#parseDouble%28java.lang.String%29" rel="noreferrer"><code>Double.parseDouble(...)</code></a> and one for <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29" rel="noreferrer"><code>Integer.parseInt()</code></a>, but it seems inconsistent:</p>
  
  <pre><code>Integer.parseInt(null); // throws java.lang.NumberFormatException: null
  </code></pre>
  
  <p>However </p>
  
  <pre><code>Double.parseDouble(null); // throws java.lang.NullPointerException
  </code></pre>