Don't do that. Read the API for Character for a static method that returns the numeric value (hint, hint) of a char.

And if you must approach this the wrong way, at least subtract '0' and not 48,...