The Artima Developer Community
Sponsored Link

Java Answers Forum
finalize( ) method of the Object Class.

1 reply on 1 page. Most recent reply: Jan 6, 2003 4:42 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Adi

Posts: 3
Nickname: goyal
Registered: Dec, 2002

finalize( ) method of the Object Class. Posted: Jan 5, 2003 9:19 PM
Reply to this message Reply
Advertisement
Hi All,

I have a query regarding the finalize method in the Object Class. The finalize( ) method is declared as protected. And this finalize method is called by the garbage collector residing in the JVM.

Since the garbage collector resides in JVM, shouldn't the finalize method be declared as public.

Please help me for the same.

Regards
Goyal


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: finalize( ) method of the Object Class. Posted: Jan 6, 2003 4:42 PM
Reply to this message Reply
Sounds like you might like to read this book: http://www.artima.com/bookshop/index.html

Flat View: This topic has 1 reply on 1 page
Topic: fragile base class Previous Topic   Next Topic Topic: how can i use a class file as a lib

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use