Is Super.someMethod()
a good practice to add clarity to the code by explicitly stating that someMethod
is not a method included in the current class but in the parent class?
For instance, would this make sense...
private void someMethod() {
super.someOtherMethod(); // this is in the parent class
otherMethod(); // this can be found here
}
Instead of this?
private void someMethod() {
someOtherMethod();
otherMethod();
}
If this is not a good idea/practice, is there any convention on this aspect that helps clarify where the method is?
Note: please take into consideration that I am not asking about disambiguating calls to overridden methods! In that particular case, to the best of my knowledge, using Super is a must in order to invoke the correct method.