Computer Applications

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

Encapsulation & Inheritance in Java

1 Like

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

3 Likes


Related Questions