String字符串转int类型
s="123";
int i;
第一种方法:i=Integer.parseInt(s);
第二种方法:i=Integer.valueOf(s).intValue();
int类型转string字符串
int i=123;
String s="";
第一种方法:s=i+"";
第二种方法:s=String.valueOf(i);
String字符串转int类型
s="123";
int i;
第一种方法:i=Integer.parseInt(s);
第二种方法:i=Integer.valueOf(s).intValue();
int类型转string字符串
int i=123;
String s="";
第一种方法:s=i+"";
第二种方法:s=String.valueOf(i);