Skills101
← Tech dictionary

Programming & OOP

What is Inheritance?

Inheritance lets a class (subclass) reuse and extend the fields and methods of another class (superclass), modelling an "is-a" relationship.

Example

class Car extends Vehicle — a Car is a Vehicle and inherits its start() method.

Learn it properlyOOP tutorials — free, with diagrams, quizzes and a certificate

Related terms