File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

disable override

 
Anthony Karta
Ranch Hand
Posts: 342
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
tony
 
Keith Lynn
Ranch Hand
Posts: 2399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a method is declared final, it can't be overridden.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic