Types of Inheritance

Let us understand various types of inheritance with their example. There are various types of inheritance supported in Java and these types are defined based on the hierarchical structure of classes and they are as below 1) Single level inheritance 2) Multi level inheritance 3) Hierarchical inheritance 4) Hybrid inheritance (Supported only using interface) 5) […]

Share this article on

Polymorphism

Polymorphism is the concept where an object behaves differently in different situations Since the object takes multiple forms, it is called Polymorphism. Types of Polymorphism Static Polymorphism (compile time polymorphism/ Method overloading): Method Overloading In a class,if we have multiple methods with same name but different in parameters then it is called Method overloading. Whenever […]

Share this article on
< Previous Next >