Inheritance is the mechanism to achieve the re-usability of code as one class(child class) can derive the properties of another class(parent class) . It also provides transitivity ie. if class C inherits from P then all the sub-classes of C would also inherit from P. Multiple Inheritance.