0
How method resolution done in overloading and overriding ?
In overloading method resolution always takes care by compiler based on reference type. hence overloading is also considered as compile time polymorphism. In overriding method resolution always takes care by JVM based on runtime object.hence overriding is also considered as runtime polymorphism
2 Answers
+ 1
Overriden methods will always be resolved, if I'm not wrong. The only way to refer to an overriden method is like super.overiddenMethod(). About the overloading, the JVM will look for the method with same references. There's no much to say about it. There can't be methods with the exact same parameters available for a class unless it is overidden. And if it overrides it should be the best resolution for the problem.
0
okay thank you đ