0% found this document useful (0 votes)
4 views

Inheritance in Java and Types of Inheritance

Uploaded by

231618
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Inheritance in Java and Types of Inheritance

Uploaded by

231618
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Inheritance In Java And Types Of Inheritance

SlideMake.com
Introduction to Inheritance in Java

Inheritance in Java is a mechanism where a new


class inherits properties and behaviors from an
existing class.

It promotes code reusability, allowing for the


creation of a new class based on an existing
class.

The existing class is called the superclass or


parent class, while the new class is called the
subclass or child class.
Types of Inheritance in Java

Single Inheritance: A subclass inherits from


only one superclass, creating a one-to-one
relationship.

Multiple Inheritance: A subclass inherits from


more than one superclass, leading to potential
conflicts and ambiguity.

Hierarchical Inheritance: Multiple subclasses


inherit from a single superclass, forming a tree-
like structure.
More Types of Inheritance in Java

Multilevel Inheritance: A subclass inherits from


another subclass, creating a chain of inheritance
relationships.

Hybrid Inheritance: Combination of multiple


and hierarchical inheritance, involving both
vertical and horizontal inheritance.

Your third bullet

You might also like