What is the differences between Heap and Stack Memory in Java? Explain

  Heap space Stack Memory
1. Used to allocate memory Used for execution of the thread
2. Instance variables are created Local variables are created
3. Contains Objects and reference variables Contains methods and local variables

Suggest An Answer

No suggestions avaliable!

Related Interview Questions