I have been thinking of what's the most appropiate way to call a method in an abstract class from an instance of one of its sub-classes. I'll show you some brief code to get it clear what I mean:
And an example of a sub class...
So if you check the last part of the code, both calls work. I think the most appropiate way of calling the method in the super class is by doing it with help of this but I might be wrong? Please let me know if you have a good explanation.
If SubClass does not override the method from AbstractClass, they are equivalent and point to the same method on the same instance, and you don't really need to use either "super" or "this".
Using "super" means that you need to change the method call if you ever override it in your subclass. Using "this" (or none) ensures that you call the overriding method if such exists (or inherited if it doesn't).
So, generally, don't use super, unless you want to ensure you don't call an overriding method.
Entia non sunt multiplicanda praeter necessitatem
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.