Good night my dear friends.Today I am going to describe you a very important OPP concept.
That is INHERITANCE.
What is inhetitance.....?
In general we all know that we have the some of the features of parents because we have inherit from them...
This also have the idea of inheritance.
Actually inheritance has a main advantage.That is reusability.
That is when we have a thing it is easy to reuse it rather than writing it again again.
That is we can reuse some features in super class(parent class) as we need in our chlid class.
The features in super class will inherit to the child class..
Inheritance can be devided into as follows..
That is INHERITANCE.
What is inhetitance.....?
In general we all know that we have the some of the features of parents because we have inherit from them...
This also have the idea of inheritance.
Actually inheritance has a main advantage.That is reusability.
That is when we have a thing it is easy to reuse it rather than writing it again again.
That is we can reuse some features in super class(parent class) as we need in our chlid class.
The features in super class will inherit to the child class..
Inheritance can be devided into as follows..
N.B Java restricts multiple inheritance!!!!!!!!
That is all for today next day i will give an good example for this.
Reference and thank you for former lecture Mr.Hemantha Kulathilaka(Bsc(hons)SLITT)
That is all for today next day i will give an good example for this.
Reference and thank you for former lecture Mr.Hemantha Kulathilaka(Bsc(hons)SLITT)