jQuery in Action, 3rd edition
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 itcrunch.com, 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 - http://java.sun.com/docs/books/tutorial/java/javaOO/final.html)
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: can final methods be over-ridden?
jQuery in Action, 3rd edition