我是刚刚开始学习android开发,其中遇到这样一个问题:
int year_int = Integer.parseInt(year.getText().toString());
当这样写这行代码的时候,运行不通过,报错说是Integer的问题,于是我便这样写:
String tem1 = year.getText().toString();
int year_int = Integer.parseInt(tem1);
运行通过了,请问这是为什么呢?