将字符转换成整型的办法

int m = (int)(i - '0');
int m = Integer.parseInt(i+"");
int m = Integer.parseInt(String.valueOf(i));


   

你可能感兴趣的:(将字符转换成整型的办法)