+ 3
What is the difference between method overloading and method overriding?
2 Respostas
+ 9
Method overloading is designing a method in a way for it to behave differently, depending on their arguments' data types.
For example: the '+' sign and a hidden method behind it, acts each time differently when adding integers, floats or strings.
Method overriding is commonly done when a method inherited by a class from its parent class has to be modified. You simply define it again in a child class. Depending on a language, it might require allowing the parent method to be overridden.
+ 4
here is an example in java but you may want to check to see difference or understand the meanings of overriding and overloading https://code.sololearn.com/c0awDMpDLukF/?ref=app