What is Overloading and Overriding


Overloading occurs when two or more methods in one class have the same method name but different parameters.

Overriding occurs when two methods have the same method name and parameters. One of the methods is in the parent class, and the other is in the child class. Overriding allows a child class to provide the specific implementation of a method that is already present in its parent class.

Comments

Popular posts from this blog

React Installation with Vite and Tailwind css (Steps to Installation)

Insert Data In mongoDb

Class methods as an alternative Constructor