0% found this document useful (0 votes)
5 views18 pages

Types of Inheritance Explained

The document discusses inheritance in programming, outlining its various types including single, multilevel, hierarchical, and hybrid inheritance. It also mentions the use of the 'super' keyword to avoid code repetition. Additionally, it touches on the concept of overriding in the context of inheritance.

Uploaded by

sbc24042006
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views18 pages

Types of Inheritance Explained

The document discusses inheritance in programming, outlining its various types including single, multilevel, hierarchical, and hybrid inheritance. It also mentions the use of the 'super' keyword to avoid code repetition. Additionally, it touches on the concept of overriding in the context of inheritance.

Uploaded by

sbc24042006
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

INHERITANCE

1)Inheritance

2)Types of inheritance
(i)Single inheritance(1 parent and 1 child)
(ii)Multilevel inheritance(parent of parent,parent and
child
Without overriding
With overriding
(iii)Hierarchical inheritance(one parent multiple child)

(iv)Hybrid-comb of inheritance types


(hierarchical and single inheritance)
(hierarchical and multilevel also possible)
1)WITH SUPER KEYWORD(SHORTER)-AVOIDS
REPETITION OF CODE
2)WITHOUT SUPER KEYWORD
2)
3)
4)

5)

You might also like