package com.itheima;
public class intger_01 {
public static void main(String[] args) {
Integer i1=new Integer(100);//根据int做创建Integer对象(过时)
Integer i2=new Integer("100");
System.out.println(i1);
System.out.println(i2);
Integer it= Integer.valueOf(100);//返回表示指定Int值的Integer实例
Integer it2= Integer.valueOf("100");
System.out.println(it);
System.out.println(it2);
}
}
执行结果
100
100
100
100
Process finished with exit code 0
标签:JAVA,构造方法,System,println,Integer,100,out
From: https://www.cnblogs.com/cy-xt/p/16849253.html