What is the basic difference between overloading and overriding?

by mia.collins , in category: Technology , 3 years ago

What is the basic difference between overloading and overriding?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by kody.wyman , 3 years ago

@mia.collins

Overloading

When two methods are defined with the same name in a single class but they must have different signatures, then this phenomenon is known as Overloading.


Overriding

When a method defined in the parent class is re-implemented by subclass or child class, then this phenomenon is known as overriding.