//聲明一個Integer對象Integer num = 10;//以上的聲明就是用到了自動的裝箱:解析為Integer num = new Integer(10);其中:可否理解為在Integer類中存在一個構造函數:int a;Integer (int a){
this.a=a
}
把10存在構造函數里面了,
然后Integer按照以上理解來使用
添加回答
舉報
0/150
提交
取消