Advantages of inheritances

Code reusability:-
This means that we can add additional features to an existing class without modifying
it.
This is possible by deriving a new class from the existing one. The new class will 
have combined features of both the classes. 
Anything that has state,behaviour,responsibilty and identity is called an object.Getting the state and 
behaviour of one, is called as inheritance.Inheritance is the process of creating 
new class called as derioved class from the existing one called as base class.The
derived class inherits all capability of base class or add totally new feature of its own. 


Suppose i thought to create a class like Button having more functionality and properties from the current Button has.Now what i do is that i will create a class and extend the current Button class and add more function and properties.