Inheritance in java

                                                                                                                                                            Inheritance refers to the process of creating a class in hierarchical manner.




Why inheritance is important ?

To reduce the time taken to develop a software.
Code can be reused that is code re-usability.
The profit made by the company would be increase. as the amount of time reduces the company can make huge profit on the other hand if the amount of time taken to develop software increases the profit made by the company also decreased. One of the means to reduce the amount of time to develop a software  is making use of inheritance concept.

Rules of inheritance
1. Private members do not participate in inheritance.
2. Constructor don't participate in inheritance.
3. Multiple - inheritance is not supported in java.
4. multilevel supported in java.
5.Cyclic inheritance is not supported in java.


Inherited, Overridden, and Specialized method

Inherited methods are such method which would be inherited from child class from parent class and would be used as it is without modification.

Overridden methods are such method which would be inherited from parent class and it would be modified in child class to suit it.

Specialized methods are such method which would be present only in child class not in parent class





















Popular posts from this blog

program to H+ELL+O W+ORLD print + before each vowels