The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000

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:

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( ),frog.java, 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.



Replies:

Sponsored Links



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