This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "varialbe storing" Watch "varialbe storing" New topic

varialbe storing

Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327

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.
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 agree. Here's the link:
subject: varialbe storing
Similar Threads
save random numbers
Contract First Service - WSDL to JAX-WS service
need some help please with project
Threads - Run and Start methods.
Why so?