Hi every bady
I need some help..
How to prevent a method being over-ridden?
How to require a method to be over-ridden?
How to call method from the super class?
If any one know help me Plz.
Thanks,
answer to your questions.
1.How to prevent a method being over-ridden?
just add the keyword 'final' in method declaration.
eg. public final void myMethod() { bla.. bla... bla... }
2. How to require a method to be over-ridden?
I am not getting what u want to ask here.
every method which is not declared final can be over-ridden.
3. How to call method from the super class?
an overridden method could be bypassed an the super method could be called by using super keyword; eg:- super.myMethod();