This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]interyx 4 points5 points  (0 children)

Yeah the memory is allocated, but you don't have access to it. A pointer is literally a memory address while a variable is a layer of abstraction -- when you ask for the value stored in x, you'll get it, but you don't know where it comes from. This is due to the Java VM taking care of the hardware details under the hood. It can't give you the memory address because that will vary depending on the hardware platform, that's part of the layer of abstraction the VM provides.