Difference between overloading and overriding

Explain the difference between Overloading and Overriding.

Overloading is also called static/early binding polymorphism.Overriding is also called dynamic/late binding polymorphism.
It happens at compile time.It happens at runtime.
It adds or extend more to the method functionality.It changes the existing functionality of the method.
Methods have different parameter lists or type or the return type.Methods have the same signature as the parent class method.
Static binding happens in overloading.Dynamic binding happens in overriding.
Java - Explain the use of ‘super’ keyword by giving an example
Use of ‘super’ keyword - super() / super(parameters) invokes the respective constructor or a method from the super class...
Define a final class in java. Explain the purpose of final class
Define a final class in java - A class declared as final cannot be extended further by any other class....
What is an interface? Explain with an example using java
What is an interface? - A class that implements an interface is compelled to implement all the methods that have been declared in the interface...
Post your comment