أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
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