1.声明方式不同,int不需要new 、Integer需要new
2.性质上根本不同点:int是基本数据类型、Integer是引用数据类型,它有自己的属性,方法
3.存储位置和方式不同:int是存储在栈中,而Integer是存储在堆中,通过栈中的引用来调用对象
4.初始值不同int 默认是0,Integer默认是null

相关文章:

  • 2022-01-12
  • 2022-12-23
  • 2022-01-08
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
猜你喜欢
  • 2021-12-20
  • 2022-12-23
  • 2021-12-27
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
相关资源
相似解决方案