Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
Beginning Java
When will a variable use memory from stack and when will use memory from heap?
Mr Chan
Greenhorn
Posts: 2
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
When will a variable use memory from stack and use memory from heap?
jason adam
Chicken Farmer ()
Posts: 1932
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This question is not based on I/O or streams, would probably be better answered in the beginners forum.
Jack J. Jackson
Greenhorn
Posts: 27
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Local variables are allocated from stack whereas instance and class variables are allocated as part of object instantiation and consume heap memory.
Jack
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
difference between stack and heap
When will a variable use memory from stack and when will use memory from heap?
Pool and Heap's of Confusion
What is Stack memory & heap memory
Heap and Stack in memory
More...