Diffrence between method overloading and overriding | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Diffrence between method overloading and overriding

14th Jun 2022, 6:12 AM
Mohammad Abdullah
Mohammad Abdullah - avatar
1 Resposta
+ 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