convertir char en int code example
Example 1: char to int
int n = Character.getNumericValue(char);
Example 2: java convert char to int
char something = '1';
int value = Integer.parseInt(something + "");
System.out.println(value); // prints 1
Example 3: conversione char int
char c='5';int i=c-'0'; // c='5'=53 '0'=48 nella tabella ascii 53-48=5