Multiple choice general knowledge science & technology

Which of the following denote advantages of Inheritance ?

  1. saves program development time

  2. code reusability

  3. data hiding

  4. A and B

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Inheritance enables code reusability by allowing new classes to inherit properties and methods from existing classes, which saves program development time. Data hiding is primarily achieved through encapsulation (access specifiers), not inheritance. The advantage combines both A and B - you get reusable code that reduces development effort.