What is the difference between Method overriding and Method overloading?
Method Overloading | Method Overriding |
---|---|
It is the concept where we define two or more methods by the same name but with different signatures. | In method overriding we define two or more identical methods which have the same name and signatures. |
The binding of the method is done at compile time. | The binding of the method is done at run time. |
There are no class restrictions i.e. it can be achieved in the same or different classes. | There are class restrictions in it i.e. it can only be achieved in different classes. |
BY Best Interview Question ON 03 Nov 2021