Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
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
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]
subject: What is inside a reference variable.
Iterator in lists
problem to understand d1.d=d2
please tell me what is wrong in my code
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013