package com.packclass;
public class Demo08 {
public static void main(String[] args) {
// int -> String
int i = 100;
System.out.println(i + "");
System.out.println(String.valueOf(100));
// String -> int
String s = "123";
System.out.println(Integer.parseInt(s));
// int -> Integer 自动装箱
Integer a = i;
System.out.println(a);
// Integer -> int 自动拆箱
int x = a.intValue();
System.out.println(x);
// String -> Integer
Integer m = Integer.valueOf("abc");
// Integer -> String
String n = String.valueOf(1000);
}
}