Oops Concept
Oops Concept
Class A{
---
}
Class B extends A{
---
}
Class C extends B{
---
}
Hierarchical Inheritance
Class A{
---
}
Class B extends A{
---
}
Class C extends A{
---
}
Hybrid Inheritance
• Hybrid inheritance is a combination
of multiple inheritance and multilevel inheritance.
Since multiple inheritance is not supported in Java
as it leads to ambiguity, so this type of inheritance
can only be achieved through the use of the
interfaces.
• If we talk about the flowchart, class A is a parent
class for class B and C, whereas Class B and C are
the parent class of D which is the only child class of
B and C.
Object Oriented Programming : Encapsulation