What is the basic difference between overloading and overriding?

by mia.collins , in category: Technology , 6 months ago

What is the basic difference between overloading and overriding?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by kody.wyman , 6 months 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.