title: Possible loss of precision; extracting char from string
body: <p>I am getting a string from the user and then doing some checking to make sure it is valid, here is the code I have been using;</p>
  
  <pre><code>char digit= userInput.charAt(0) - '0';
  </code></pre>
  
  <p>This had been working fine until I did some work on another method, I went to compile and have been receiving a 'possible loss of precision' error since then.</p>
  
  <p>What am I doing wrong?</p>