what is the difference between heap and stack

Answer:The main difference b/n the Heap and the Stack are given below:

1.In stack we create object temporary where programmer used to reserve allocation.'
2.stack not have automatic garbage collection where as heap have automatic garbage collection.

No comments:

 
Top Blogs