Example & Tutorial understanding programming in easy ways.

What is the difference between Overloading and Overriding?

Overloading : When same method name with different arguments types or different  list of arguments  and may be different return type is called as overloading.
Overriding :
When a method in a class has the same method name with same arguments as that of the superclass, it is said to be method overriding.

overloading: Overloading does not block inheritance from the superclass. Overloaded methods must have different method signatures

overriding :  Overriding blocks inheritance from the superclass. Overridden methods must have same signature.

Read More →