title: How to find integer value of specific characters in a Java string array?
body: <p>I am using the following code to take a string value like 9s or 4c that is located within a string array and find just the integer value of the first character. I would also like to be able to use this for string values with multiple numbers like 10s or 13c.</p>
  
  <pre><code>total = total + Integer.parseInt(a[i].substring(0)) + 1;
  </code></pre>
  
  <p>This gives me a number format exception. Any ideas what I might be doing wrong?</p>