The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000



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.


Ask for Answer

Posted by Lu Ping on December 01, 2000 at 5:05 AM

In Chapter 7 of ��Think in Java��,in the section:Inheritance and finalize( ),, in the example,the order of finalization is the reverse of the order of initialization. But as for the finalization of Characteristic,the result is the reverse order of finalization:
finalizing Characteristic is alive
finalizing Characteristic has heart
finalizing Characteristic can live in water

I can't understand this,this seems the objects in the base class are finalized before that in the derived class.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us