The Artima Developer Community
Sponsored Link

Java Buzz Forum
Why is finalize method protected?

0 replies on 1 page.

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 0 replies on 1 page
Rajiv Shivane

Posts: 36
Nickname: shivane
Registered: Jul, 2004

Rajiv Shivane heads the PRC Group at Pramati Technologies
Why is finalize method protected? Posted: Sep 22, 2005 12:11 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Rajiv Shivane.
Original Post: Why is finalize method protected?
Feed Title: 0xCAFEFEED
Feed URL: http://feeds.feedburner.com/cafefeed
Feed Description: Thoughts on JavaTM/J2EETM and related technologies
Latest Java Buzz Posts
Latest Java Buzz Posts by Rajiv Shivane
Latest Posts From 0xCAFEFEED

Advertisement
Rakesh sent me a mail the other day asking why the finalize method is protected. Well, here's what I think: The finalize method is invoked by the JVM/GarbageCollector on Objects which are no longer referenced. So, if I were the guy who designed the finalize method, ideally I would want it to be private. Just like why the writeObject method of the Serializable interface is private. These

Read: Why is finalize method protected?

Topic: Oracle Proxy Users by example Previous Topic   Next Topic Topic: C-JDBC, Get on the Freaking Ball!

Sponsored Links



Google
  Web Artima.com   

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