• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Xplain me plz..

 
Nandish KB
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
4 Which line of code inserted //Here will free up a single object for garbage

collection?


Answers:
1 a.i = null;
2 b.i = a.i;
3 b = null;
4 a = d.i;
5 d.i = b.i;
6 e = null;

Correct Ans: 5

Plz Explain me in detail Y 5 is the correct ans.
Regards,
Nandish
[ September 22, 2004: Message edited by: Barry Gaunt ]
 
Mahesh Bhatt
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi nandish,

here is the explanation, sorry I cannot give you a pictorial representation here, so it might be a little hard understanding this:


if you try to make a pictorial representation of this explanation step by step I am sure you would get this concept very much clear, I do it, it would even help you in your exam.
[ September 22, 2004: Message edited by: prashant bhogvan ]
 
Nandish KB
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prashant,
Thanx for ur response.Yeah I came to know about it by drawing diagrams as per ur suggestions..

Thanx.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic