wood burning stoves 2.0*
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
Author

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 .


regards
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Reference Variable