Polymorphism vs Overloading vs Overriding
Someone asked me the other day, what are the difference between Polymorphism and Overriding in Java and the similar difference between Polymorphism and Overloading. After explaining to him personally, I thought to write a blog post about it and here we are. Well, they are not two different things, Polymorphism is an object-oriented or OOP concept much like Abstraction, Encapsulation, or Inheritance which facilitates the use of the interface and allows Java program to take advantage of dynamic binding in Java. Polymorphism adds flexibility to your code which makes it more extensible and maintainable.