Polymorphism

Static Polymorphism Dynamic Polymorphism

Static Polymorphism Dynamic Polymorphism Summary: By the end of this tutorial "Static Polymorphism Dynamic Polymorphism", you will understand their differences. Explained with programs in simple words. It is the continuation of previous program Difference: Static binding and Dynamic binding and knowledge of binding is very much required for better understanding this concept as binding leads …

Static Polymorphism Dynamic Polymorphism Read More »

Java Dynamic Binding Dynamic Polymorphism

Static binding and static polymorphism is achieved through method overloading. Now let us go for dynamic polymorphism. Observe the following code. Program of Java Dynamic Binding Dynamic Polymorphism class Bird { public void eat() // I { System.out.println(“All birds eat”); } } class Peacock extends Bird { public void eat() // II { System.out.println(“Peacock eats …

Java Dynamic Binding Dynamic Polymorphism Read More »