Differences between method overloading and overriding are:
1. Method overloading is static polymorphism. Method
overriding is runtime polymorphism.
2. Method overloading occurs within the same class. Method
overriding happens in two classes with hierarchy
relationship.
3. Parameters must be different in method overloading.
Parameters must be same in method overriding.
4. Method overloading is a compile time concept. Method
overriding is a runtime concept.
Post a Comment