Question OOP-INH-0023
EasyWhat is single inheritance?
- A.
Only one object can be created
- B.
A class inherits from exactly one parent class
- C.
Show answer and explanation
Answer: B
For example, Dog extends Animal.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Inheritance question
What is single inheritance?
Only one object can be created
A class inherits from exactly one parent class
Answer: B
For example, Dog extends Animal.
A class has only one method
A class inherits from itself