This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes varialbe storing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "varialbe storing" Watch "varialbe storing" New topic
Author

varialbe storing

Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 330
Hey,

Primitives and Object reference are store in stack right.

Suppose int i=6;

Then this should save in stack know..but where is i and 6 save? is it like both save in stack separately where i refer to 6? (e.g: i->6)

Thank You.
chandrakant karale
Ranch Hand

Joined: Nov 21, 2007
Posts: 41
Please refer.

http://www.coderanch.com/t/416620/Beginning-Java/java/What-stored-Stack-Heap
Ulrika Tingle
Ranch Hand

Joined: Nov 24, 2009
Posts: 92
Harshana Dias wrote:
Primitives and Object reference are store in stack right.


Do really need to know that now? Who cares "where" things are stored. What's important is that you know what happens, that the i variable gets assigned a 6.

If you're just learning Java you can do perfectly fine without things like stack and heap. They're not part of the language. They're supposed to help you understand stuff but if you feel they're not helping just forget about them. Above all, don't let them be a hindrance.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: varialbe storing
 
It's not a secret anymore!