目录
此篇文章需要用到以下内容:
什么是包装类?
包装类的本质是一个类,是基本数据类型和相关方法的封装,包装类中的方法简便了工作,提高了代码的简洁性,丰富了代码功能。
128陷阱
public static void main(String[] args) {
Integer a1=10;
Integer a2=10;
System.out.println(a1==a2);
Integer a3=1000;
Integer a4=1000;
System.out.println(a3==a4);
}