This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Reference Variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reference Variable" Watch "Reference Variable" New topic

Reference Variable

faisal usmani
Ranch Hand

Joined: Jan 14, 2006
Posts: 139
Hello ,

As we know , in java there is a reference variable for referencing Objects . So what is the size of a reference variable .

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

It's entirely dependent on the JVM implementation. One might assume it's just the right size to hold a pointer. On a 64-bit machine it's probably 64 bits; otherwise, it's probably 32. But it could be larger or smaller -- there's no way to tell from Java.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Reference Variable
It's not a secret anymore!