InterviewSolution
Saved Bookmarks
| 1. |
What is Polymorphism and its types in OOPS? |
|
Answer» Polymorphism is one of the core concepts which is used in object-oriented programming. Polymorphism generally shows the relationships between parent class objects and child class objects. Types of polymorphism in OOPs
It is a technique in which one class acquires the property of ANOTHER class. With the help of inheritance, we can reuse the fields and methods of the existing class. Inheritance has three type, are given below.
But PHP supports only single inheritance, where only one class can be derived from single parent class. We can also use multiple inheritance by using interfaces. |
|