[HD Pg 0, Sec. 3.4.2 - creating-wrapper-objects]
Posted: Sun Dec 29, 2019 3:36 pm
Let's say :
Line 1 : int i = 100;
Line 2 : Integer i1 = i;
Line 3 : Integer i2 = 100;
On line 2, will the object be created in heap, with value 100? and this both i1 and i2 will point to the same object?
Thanks
Aniruddha
Line 1 : int i = 100;
Line 2 : Integer i1 = i;
Line 3 : Integer i2 = 100;
On line 2, will the object be created in heap, with value 100? and this both i1 and i2 will point to the same object?
Thanks
Aniruddha