Professional Documents
Culture Documents
***********************************************************************************
****************************************************************
1) The main difference between heap and stack is that stack memory is used to store
local variables and function call while heap memory is used to store objects in
Java. No matter, where the object is created in code e.g. as a member variable,
local variable or class variable, they are always created inside heap space in
Java.
***********************************************************************************
******************************************************************