wood burning stoves
The moose likes Java in General and the fly likes disable override Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "disable override" Watch "disable override" New topic

disable override

Anthony Karta
Ranch Hand

Joined: Aug 09, 2004
Posts: 342
the scenario is

I have a classA with some public methods (used by other composite classes), but I don't want those methods get overide in classB when classB extends classA.

is that possible? maybe I need to re-design, if so, how?

many thanks

Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2398
If a method is declared final, it can't be overridden.
I agree. Here's the link: http://aspose.com/file-tools
subject: disable override
It's not a secret anymore!