//声明一个Integer对象
Integer num = 10;
//以上的声明就是用到了自动的装箱:解析为
Integer num = new Integer(10);
其中:可否理解为在Integer类中存在一个构造函数:
int a;
Integer (int a){
this.a=a
}
把10存在构造函数里面了,
然后Integer按照以上理解来使用
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
哈哈,这个有趣的问题我可是要上java源码来证明你的答案啦!

当然,你是正确的