Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is Stack memory & heap memory

 
Vishnu Sharma
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is Stack memory & Heap memory??
Is there any relation like: Stack memory only saves Stack variable?? If yes then what is the purpose of Heap memory then??
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A quick search on google --> What is difference between heap memory and stack memory

In short: Local variables live on the stack, objects live on the heap.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic