String str;
int i;stringtoint:
i = Integer.parseInt(str);inttoString:
str=Integer.toString(i);请用try、catch