Why the output getting differed in hexadecimal integer to character conversion?
<p>Why the output varies in both of the following codes since i am applying the same explicit type conversion.</p>

<pre><code>    int hex = (char)0xA;
    System.out.println(hex);

    int hex = 0xA;
    System.out.println((char)hex);
</code></pre>
