Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exam lab question on Garbage Collection

 
Mohit G Gupta
Ranch Hand
Posts: 634
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


How many objects are eligible for garbage collection after c.aob=null;?

Answer:2

i think answer should be 1
i have attached the image file showing the objects
s.png
Diagram
[Thumbnail for s.png]
 
Prasad Kharkar
Ranch Hand
Posts: 446
1
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Discussed many times..
Remember only objects are eligible for Garbage collection not refernce type
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic