java convert char to int

Java
char charValue = '2';
int intValue = Character.getNumericValue(charValue); // 2char something = '1';
int value = Integer.parseInt(something + "");
System.out.println(value);  // prints 1
Source

Also in Java: