Inheritance in Java
Inheritance in Java
Rajam Naidu
• In OOP another important feature is Reusability which is very
use full in two major issues of development :
• Saving Time
• Saving Memory
• Deriving new classes from existing classes such that the new
classes acquire all the features of existing classes is called
inheritance.
..................
..................
}
class SubClass extends SuperClass{
..................
..................
}
The advantage of Inheritance?
• Multiple Inheritance:
Defining a Subclass:
{
Variable declaration;
Method declaration;
}
Member access rules
Sub-class1 Sub-class2
Your logo