Transcript

Method OverloadingMethod Overriding

1. Happens in the same classHappens among two classes a super class and a subclass

2. No inheritanceHappens in inheritance only

3. One method does not hide anotherSubclass method hides super class method

4. Should have different parametersShould have same parameters

5. Return type is not botheredShould have the same return type

6. Leads tostatic binding and static polymorphismLeads todynamic binding,dynamic polymorphismanddynamic method dispatch


Recommended