hi,
Acc to my understanding, all primtives stay in stack, and objects stay in heap.Now, i want to know that how does int primitive is converted into Integer object in autoboxing. (i.e how does it get a reference to a stack and creates an object in the heap ). This was asked in one of the interviews which was attended by me ... Probabaly he wanted to know how does auutoboxing occurs internally
Also, he asked how can one improve/increase stack/heap memory programitaclly
Acc to my understanding, all primtives stay in stack, and objects stay in heap.Now, i want to know that how does int primitive is converted into Integer object in autoboxing. (i.e how does it get a reference to a stack and creates an object in the heap ). This was asked in one of the interviews which was attended by me ... Probabaly he wanted to know how does auutoboxing occurs internally
Also, he asked how can one improve/increase stack/heap memory programitaclly