Why do We Need Inheritance in Java?

DEEPAK KUMAR GUPTA
DEEPAK KUMAR GUPTA
from Dhanbad
1 month ago

We use inheritance in Java for the following reasons:

  • We can reuse the code from the base class.
  • Using inheritance, we can increase features of class or method by overriding.
  • Inheritance is used to use the existing features of class.

More detail go this tutorial: Java Inheritance

LockSign in to reply to this thread