Computer Applications

Why do you need to use inheritance? Give two reasons.

Encapsulation & Inheritance in Java

3 Likes

Answer

We need to use inheritance for the following reasons:

  1. Inheritance divides a program into useful and reusable set of classes.
  2. Changes made in the original class are reflected in all the inherited classes.

Answered By

2 Likes


Related Questions