File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mock Exam Errata and the fly likes can final methods be over-ridden? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "can final methods be over-ridden?" Watch "can final methods be over-ridden?" New topic

can final methods be over-ridden?

Ranch Hand

Joined: Jan 15, 2001
Posts: 162
I think they can not be.
But while doing quiz at, I got a response, that
"You can over ride methods declared final in super class".
How is it possible?
abhijit r

Joined: Mar 07, 2001
Posts: 4
A method that is declared 'final' cannot be overridden in a subclass.
Methods that are declared 'static' and methods that are declared 'private' are implicitly 'final'.
(Java: How to Program - Deitel & Deitel, 3rd Edition, page 410)
You can use the 'final' keyword in a method declaration to indicate to the compiler that the method cannot be overridden by subclasses.
(from Sun's documentation on Java -
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
abhijit r,
Please read the JavaRanch Name Policy and re-register using a name that complies with the rules.
Thanks for your cooperation.
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
I agree. Here's the link:
subject: can final methods be over-ridden?
It's not a secret anymore!