This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes why stack or heap why not any one Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "why stack or heap why not any one" Watch "why stack or heap why not any one" New topic

why stack or heap why not any one

Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Dear Ranchar

As we know that instance variable and object are stored on the heap memory where as local variable and method are stored on the stack.

But here i am thinking that why these difrence has been made that some are stored on heap and some are stored on stack. why not these are stored either on stack or heap. what benfit we will get by creating heap or stack.
please specify me.

with regard

Arun kumar maalik
I agree. Here's the link:
subject: why stack or heap why not any one
It's not a secret anymore!