title: Why can't I typecast from char to int?
body: <p>For some reason, the following code does not work:</p>
  
  <pre><code>char cValue = '8';
  int digits = (int)cValue;
  </code></pre>
  
  <p>It keeps giving some value of 5 or 7, or something along those lines.</p>
  
  <p>I'm just curious why - I'm using <code>Character.getNumericValue(cValue);</code> instead.</p>
  
  <p>Why does this happen?</p>