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); //装箱,推荐,带有缓存,最好使用第二种
	}
}

 java 包装类的应用

 

相关文章:

  • 2022-12-23
  • 2021-11-01
  • 2022-02-10
  • 2022-12-23
  • 2022-01-17
  • 2020-05-26
  • 2021-04-13
  • 2021-10-01
猜你喜欢
  • 2021-07-23
  • 2022-12-23
  • 2022-01-28
  • 2021-12-09
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案