Filter interviews by
Inheritance is a mechanism in object-oriented programming where a class acquires the properties of another class.
Inheritance allows for code reuse and promotes code organization.
The class that is being inherited from is called the superclass or parent class.
The class that inherits from the superclass is called the subclass or child class.
The subclass can access the public and protected members of the superclass.
Example...
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they were objects of the same class.
It is achieved through method overriding and method overloading.
Example: A parent class Animal can have child classes like Dog, Cat, and Cow. Each child class can have its own implementation of the method 'makeSound'.
Polymorphism makes code more flexible
Top trending discussions
I applied via Walk-in and was interviewed before Dec 2020. There were 3 interview rounds.
I applied via Recruitment Consultant and was interviewed in Nov 2020. There were 3 interview rounds.
I was interviewed in Mar 2021.
I applied via Campus Placement and was interviewed in Mar 2021. There was 1 interview round.
I applied via Referral and was interviewed before Mar 2021. There were 2 interview rounds.
Grammar and analytical questions
TCS
Infosys
Wipro
HCLTech