+ 6
What are the difference between heap and stack memory in java ?
2 Respostas
+ 5
The Stack is the part in memory where local variables and function calls space is allocated. Thats why if you create a recursive function without a base case you will get a StackOverFlowError in java as each call takes up more of the available space of the stack until it runs out
The Heap is where objects are stored.
i am very limited here so you can search the web also
+ 1
Stack is a static memory, where heap is a dynamic memory