Diffrence between method overloading and overriding | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Diffrence between method overloading and overriding

14th Jun 2022, 6:12 AM
Mohammad Abdullah
Mohammad Abdullah - avatar
1 Réponse
+ 7
When you overload a method, you are simply redefining that method with a different signature (i.e parameters). While, when you override a method, you are giving a different implementation of that method with the same signature (This requires inheriting from another class) https://code.sololearn.com/c8gAP56d2Fb7/?ref=app
14th Jun 2022, 8:07 AM
Baribor Saturday
Baribor Saturday - avatar