Register now or log in to join your professional community.
the main difference between java stack memory and heap memory is ,in stack memory is used to store local variables and function call .
while heap memory is used to store object in java,where object is created as member variables,class variables ,they are always created inside heap space in java