aspose file tools
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
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: 24189

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]
subject: Reference Variable