aspose file tools*
The moose likes Beginning Java and the fly likes Question on garbage collection from Kathy Sierra. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Question on garbage collection from Kathy Sierra." Watch "Question on garbage collection from Kathy Sierra." New topic
Author

Question on garbage collection from Kathy Sierra.

Shanu Pandey
Greenhorn

Joined: Mar 17, 2011
Posts: 18

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

Joined: Dec 17, 2009
Posts: 133
I guess you should first read Head First Java.
Shanu Pandey
Greenhorn

Joined: Mar 17, 2011
Posts: 18

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

Joined: Oct 02, 2003
Posts: 11422
    
  16

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.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Justin Filmer
Greenhorn

Joined: Jul 04, 2011
Posts: 27
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

Joined: Mar 17, 2011
Posts: 18

Thanks Justin Filmer..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on garbage collection from Kathy Sierra.