java中将char类型的数字转化为int型

char a=‘3’;
//转化为int
int b=a-‘0’;

猜你喜欢

转载自blog.csdn.net/sinat_36220370/article/details/88017521