*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "can final methods be over-ridden?" Watch "can final methods be over-ridden?" New topic
Author

can final methods be over-ridden?

ZEESHAN AZIZ
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
Greenhorn

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: can final methods be over-ridden?
 
Similar Threads
interface
final
can main be declaired final ? why
final static variables in beans?
Abstract Methods