This is a newbie question. I read that JVM execution begins by looking for a method name from a junior class in the hierarchy, and if this method is not available in this class, it goes to the parent class, looking for the method.
If so, then why do we need to use "@override" to add custom logic to the inherited class?
The following example illustrates my question.
class superclassA { method() { } } class subclassB extends superclassA { @Override
source share