Where it stored ? Stack or heap | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Where it stored ? Stack or heap

When i create an object in main where it is stored ?

4th Apr 2020, 9:34 PM
Michel Ghaith
Michel Ghaith - avatar
1 Answer
+ 3
That depends on if you just declare it (stack) or if you use 'new' (heap).
4th Apr 2020, 9:54 PM
HonFu
HonFu - avatar