A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
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
Java 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]
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: What is inside a reference variable.
please tell me what is wrong in my code
Iterator in lists
problem to understand d1.d=d2
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014