public static void main(String[] args) {
Integer i1=new Integer(100);
Integer i2=new Integer("500");
System.out.println(i1);
System.out.println(i2);
Integer i3=Integer.valueOf(100);
Integer i4=Integer.valueOf("123");
}
int–string互相转换
//int->string
int i=100;
String s1=""+i;//1fa
String s2=String.valueOf(i);//2法
//String ->int
//1法 string->Integer->int
String s3="100";
Integer i1=Integer.valueOf(s3);
int ii=i1.intValue();
System.out.println(i1);
//2fa
int iii=Integer.parseInt(s3)