package com.ilaw.boson.controller; public class Demo { public static void main(String[] args) { Integer a = new Integer(2000); int b =2000; Integer c =b; System.out.println(a == b);//true,Integer和int进行操作的时候,对a进行拆箱处理 System.out.println(b == c);//true,…
一.基本类型打包器 1.基本类型:long.int.double.float.boolean 2.类类型:Long.Integer.Double.Float.Boolean 区别:基本类型效率更高,类类型的对象却可以携带更多的信息. public class TestInteger01 { public static void main(String[] args) { int a = 10; int b = 20; Integer A = new Integer(a); Integer B =…