Character: digit(char ch, int radix)
public class Main { public static void main(String args[]) { System.out.printf( "Convert character to digit: %s\n", Character.digit( '2', 1 ) ); } }