This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

finalize().!!

 
sharma anurag
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all my Friends of javaranch.!!
i want to know if we are not defining finalize method in our applicatiion than shall this method would call automatically, if yes,than what is thier(content)in the finalize method ??
Thanks in advance.!!!
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If neither your class nor its subclasses define a finalize() method, then the finalisation step is effectively a no-operation.

... which is exactly what it should be, 99.9% of the time, as the finalisation mechanism is a poorly-conceived hang-over from the very earliest days of Java. There are very few valid reasons to define a finaliser, these days.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic