+ 1
Calling an overridable method from a not overridable method
For example: public class Example{ //Not overridable public void a(){ b(); } //Overridable public void b(){ } } I want only b() overridable. I can't use final, static or private keywords with a(). Any ideas?
1 Réponse
+ 2
public final void a() should work.
I've made a small example. Hope it helps.
https://code.sololearn.com/co5d5GMTUUIU/?ref=app