java 包装类的应用

package integer;
public class baozhuang {
public static void main(String[] args) {
System.out.println(Integer.MAX_VALUE);
System.out.println(Integer.MIN_VALUE);
System.out.println(Integer.TYPE);
System.out.println(Integer.SIZE);
System.out.println(Double.SIZE);
System.out.println(Float.SIZE);
Integer n1=15;
double n2=n1.doubleValue();
System.out.println(n2);
Integer n=new Integer(15);//装箱
Integer n3=Integer.valueOf(45); //装箱,推荐,带有缓存,最好使用第二种
}
}


浙公网安备 33010602011771号