Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

finalize

 
MS Khan Khan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why finalize() method is made protected in Object class.plz give a solid logical answer.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finalize can only be called by the object itself and not from outside.
It must be protected that subclasses are able to call the finalize method which the inherited from Object if none is implemented.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic