Why String.valueOf(null) is causing null pointer exception?
<p>Why String.valueOf(null) is causing null pointer exception? Where the expected behaviour is to return "null" string. </p>

<pre><code>String x = null;
    System.out.println(String.valueOf(x));
</code></pre>

<p>This give a "null" string. but </p>

<pre><code>System.out.println(String.valueOf(null));
</code></pre>

<p>will cause null pointer exception.</p>
