一、int转String
int i = 100;
1、String s1 = i+" ";
2、String s2 = String.valueOf(i);
3、Integer i2 = new Integer(i);
String s3 = i2.toString();
4、String s4 = Integer.toString(i);
System.out.println(s1);
二、String 转int
String s = "200";
1、
Integer i3 = new Integer(s);
int i4 = i3.intValue();
2、int i5 = Integer.parseInt(s);
注:基本数据类型包装类由8种,其中7种都有parseXxx的方法,可以将这7种的字符串表现形式转换成基本数据类型