Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on garbage collection from Kathy Sierra.

 
Shanu Pandey
Greenhorn
Posts: 18
Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This Question is from Kathy Sierra page 274 chapter 3.





When line 14 is reached,
(1)how many objects will be created and
(2)how many objects will be eligible for garbage collection?


Please Reply....with diagram (if possible)
 
Yogesh Gnanapraksam
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you should first read Head First Java.
 
Shanu Pandey
Greenhorn
Posts: 18
Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok,now can you please tell me in which chapter of Head First the Garbage Collection is given and to know about GC which chapter i should read???I m online and waiting for your reply...
 
fred rosenberger
lowercase baba
Bartender
Posts: 12149
31
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we really don't like to hand out answers. You don't learn as much, and it is not the best use of anyone's time.

What we like to see is YOU putting in some effort. Work out what you believe the answer is, tell us why you think that, and how that is different from the 'real' answer (if it is).

Most ranchers won't put any more effort into answering a question than you do asking - and so far, you have put in almost none.
 
Justin Filmer
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shanu Pandey wrote:Ok,now can you please tell me in which chapter of Head First the Garbage Collection is given and to know about GC which chapter i should read???I m online and waiting for your reply...

Depends on your edition of the book...
In the standard 2nd edition of the book, object lifecycle is covered in Chapter 9, pages 260-263.
 
Shanu Pandey
Greenhorn
Posts: 18
Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Justin Filmer..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic