Forums Register Login

why instance variable on heap?

+Pie Number of slices to send: Send
Dear sir would you please explain me that why

---->Instance variable and object live on heap?
----->Local variable and method live on stack?

As we know that heap created on run time wheras stack form on compile time and i think that instance variable and object form on run time where as local variable and method form on compile time. I think due to this but i am not sure so please specify me.


Thanks

Arun kumar maalik
Yes, my master! Here is the tiny ad you asked for:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 456 times.
Similar Threads
why stack or heap why not any one
Reference Variables on the stack
K&B - Statement, Cannot understand
Method local inner classes
Garbage collection
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 22:55:10.