测试类
public class test22 {public static void main(String[] args){int num=5;Integer obj1=new Integer(num);System.out.println("obj1的值为"+obj1);Integer obj2=100;System.out.println("obj2的值为"+obj2);Integer obj3=new Integer("-789");System.out.println("obj3的值为"+obj3);}
}
运行结果