Filter interviews by
Polymorphism is the ability of a function or method to behave differently based on the object it is called with.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example: Animal class with methods eat() and sleep(). Dog and Cat classes can override these methods to have t
Multiple inheritance is a feature in object-oriented programming where a class can inherit attributes and methods from more than one parent class.
Allows a class to inherit from multiple parent classes
Can lead to the Diamond Problem where ambiguity arises when a class inherits from two classes that have a common ancestor
Languages like C++ support multiple inheritance
Top trending discussions
Senior Executive
225
salaries
| ₹2 L/yr - ₹6.5 L/yr |
Executive
66
salaries
| ₹2 L/yr - ₹4.1 L/yr |
Senior Officer
59
salaries
| ₹2.9 L/yr - ₹7 L/yr |
Specialist
26
salaries
| ₹3.5 L/yr - ₹8 L/yr |
Executive Accountant
23
salaries
| ₹2.3 L/yr - ₹4.4 L/yr |
DTDC Express
ElasticRun
GATI-KWE
Mahindra Logistics