+1 vote
by (876 points)

1 Answer

+1 vote
by (524 points)
selected by
Best answer

Heap memory is used by all the parts of the application whereas stack memory is used only by one thread of execution. Whenever an object is created, it’s always stored in the Heap space and stack memory contains the reference to it.