interface polymorphism

Topics related to In and Outs of interfaces

1. Interfaces – Partial implementation of Multiple Inheritance 2. Abstract class constructor & Interface abstract 3. Abstract Static Method 4. Interface Polymorphism 5. Interfaces – Partial implementation of Multiple Inheritance 6. Extends Implements 7. Play with Implements 8. Abstract Classes 9. Why the methods of an interface should be overridden as public only? 10. Can …

Topics related to In and Outs of interfaces 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 »