Thursday, August 1, 2013

[PART-4] JAVA : Inheritance

Inheritance : It means to get the features of one class into another class.

There are four types of inheritance in Java :

1.)Single  Inheritance



Here class b will inherit or take the features of class a.


2.)Multilevel Inheritance


Here class c will inherit the features of class a and b respectively.
class b will inherit the features of a only.


3.)Hierarchical Inheritance
Here classes b and c both will inherit the features of class a.


4.)Multiple Inheritance

Here class c will inherit the features of class a and b respecively.
But Java DOES NOT SUPPORTS MULTIPLE INHERITANCE TO AVOID COMPLEXITY.
We will discuss inheritance programs in next tutorial.



0 comments:

Post a Comment