types of inheritance in oops code example

Example 1: types of inheritance

OOPs support the six different types of inheritance as given below :
Single inheritance.
Multi-level inheritance.
Multiple inheritance.
Multipath inheritance.
Hierarchical Inheritance.
Hybrid Inheritance.

Example 2: inheritance in oops

it is used to define relationship between two class, 
which a child class occurs all the properties and
behaviours of a parent class. 
Provides code reusability. We can implement by using
extend keyword
Ex: in my framework I have a TestBase class which I store 
all my reusable code and methods. My test execution classes and 
elements classes will extend the TestBase in order to reuse the code.