*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes finalze method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "finalze method" Watch "finalze method" New topic
Author

finalze method

Smitha Ballikar
Ranch Hand

Joined: Aug 02, 2005
Posts: 99


In one of the mock exams it sayd the finalize method signature is right.I thought it is protected.Also, if its wrong does a produce a runtime error or compile time.

Cheers
Smitha
vijaya bacina
Ranch Hand

Joined: Aug 23, 2005
Posts: 155
hi
the finalize() method is right... since we can make "protected" methods in super class to "public" in subclasses..
Ryan Kade
Ranch Hand

Joined: Aug 16, 2005
Posts: 69
Remember, overridding methods can always be less restrictive than their parent methods. The one exception are private methods, which of course can't be overridden because they can't be seen by the subclass.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Smitha, are you compiling and running your examples? Or are you studying Java theoretically?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: finalze method
 
Similar Threads
finalize method call Error
Gc question
finalize
why finalize() can't be defined as private?
Finalization Method