相互转化操作
// int 和string 相互转化操作
public static void test() {
int number= 100;
// 方法一int to String
String s1=""+ number;
//方法二int to String
String s2=String.valueOf(number);
System.out.println(s2);
String s="100";
//方法一String to int
Integer i= new Integer(s);
int x=i.intValue();
System.out.println(x);
//方法二String to int
int y=Integer.parseInt(s);
System.out.println(y);
}