![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> Hello, > I am learning java and find your book Thinking in Java (TIJ2.pdf) really good. > There was one problem that I faced while executing one of the e.g. the code for c07:Frog.java. This compiled w/o any problem. When I executed it the first time with a command line parameter of "finalize", I got the o/p as specified in the book. But on subsequent executions, after the Frog, Amphibian and Animal finalize, the program terminated! > I didn't see these messages: > LivingCreature finalize > Is it because Garbage Collection is not predictable? Maybe I need to review my concepts, but any light in this direction is most certainly appreciated! (Actually, Thinking in Java is Bruce's book. You unknowingly This article should clear up your questions about finalization http://www.artima.com/designtechniques/cleanup.html Replies: |
Sponsored Links
|