A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
What is inside a reference variable.
Joined: Dec 17, 2007
Apr 09, 2008 04:47:00
//i stores bit patern of 10(1010)
Dog d = new Dog();
But what d stores ?Is that mean d stores the memory location of (new Dog).As like pointers.
author and iconoclast
Joined: Jul 08, 2003
Apr 09, 2008 05:27:00
will not let you see that bit
, no matter how hard you try; there's no way to convert a reference into an int, as you can in C++. So it truly doesn't matter.
But yes, it's a pointer, or perhaps a pointer to a pointer (a "handle"), which allows for object movement and heap compaction.
[Jess in Action]
I agree. Here's the link:
subject: What is inside a reference variable.
please tell me what is wrong in my code
problem to understand d1.d=d2
Iterator in lists
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015