Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Working steadily toward my SCJP.....
Christopher Collier wrote:
If e1.e = e3 and e3 is later set to null, this means that e1.e = null right?
Henry Wong wrote:
Christopher Collier wrote:
If e1.e = e3 and e3 is later set to null, this means that e1.e = null right?
No. Of course not. When you set the e1.e reference to point to the same object as the e3 reference, they are two different references that point to the same object. It doesn't tie the two references together, to be always pointing to the same thing.
Henry
Working steadily toward my SCJP.....
OCPJP 6
Bert Bates wrote:I hope a couple of things are true:
1 - I hope that jonathan said in his mock exams that he copied this question directly from the K&B book, making only meaningless and minor changes.
2 - I hope you didn't pay jonathan anything because he's using copyrighted material that's not his.
OCPJP 6
mini sanjay wrote:hi The following code found in http://jonathangiles.net for scjp preparation,
the comment has given like, until reach line 3, the objects are not eligible for GC.
My question is when we reach line 2 (e3 is already null and it did not refer to any objects) and when reach line 1, e2 did not refer e1, that means e2 is isolated objects. why e2 is not eligible for GC?,
After All Said And Done, I Have Been Studying G.C. For The Past Two Days, I Came To Discover That Simply Getting A Pencil And Paper And Practice Drawing A Sketch Of The Heap And References That 'REFER' (I Know C++ Fans Will Prefer 'POINT') To Objects In The Heap 'From-The-Outside-World', Made It Very Easy And So Much Fun!! In The Real Exams Thinking About 'Jackzia-Refers-To-Bert-Refers-To-Katty' Might Burn Too Much Time And Energy Needed To Resolve Other Problems.
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
|