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:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
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
You didn't tell me he was so big. Unlike this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
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...