What's the "java" way of converting chars (digits) to ints
How about Character.getNumericValue
?
I'd strongly prefer Character.digit
.
The first method. It's the most lightweight and direct, and maps to what you might do in other (lower-level) languages. Of course, its error handling leaves something to be desired.