Чар до инт
int n = Character.getNumericValue(char);
Obnoxious Ocelot
int n = Character.getNumericValue(char);
int i = (int)(c - '0');
int i;
char c = 'A';
i = (int)c;
char a = 'a';
int ia = (int)a;
/* note that the int cast is not necessary -- int ia = a would suffice */
char c='5';int i=c-'0'; // c='5'=53 '0'=48 nella tabella ascii 53-48=5