char类型转为int类型的两种方法
1 类型转换
char ch = '3';
//转换为String类型
String str = String.valueOf(ch);
//转为Integer
Interger in = Integer.valueOf(str);
int i = in;
System.out.println(i + 10);
2 减'0';
char ch = '3';
int i = ch - '0';
System.out.println(i + 10);