

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Single and Multiple Inheritance
In this post, we will understand the difference between single inheritance and multiple inheritance.
Single Inheritance
It is the one wherein the derived class inherits the single base class.
The derived class inherits the features of the base class.
It requires a small run time in comparison to multiple inheritance.
It has less overhead.
It is a generalization.
It is simple in comparison to multiple inheritance.
It can be implemented in any programming language.
Implementation:
Class DerivedClass_name : access_specifier Base_Class{};
Multiple Inheritance
The derived class derives from two or more base classes.
The derived class uses the combined features of the multiple base classes.
It requires more run time in comparison to single inheritance.
It has more overhead.
It is a specialization.
It is complex in comparison to single inheritance.
Only C++ supports multiple inheritance
Implementation:
Class DerivedClass_name : access_specifier Base_Class1, access_specifier Base_Class2, ….{};
- Related Questions & Answers
- Difference Between Inheritance and Polymorphism
- C# and Multiple Inheritance
- Java and multiple inheritance
- Difference between inheritance and composition in Java
- Difference between private, public, and protected inheritance in C++
- Multiple Inheritance in C++
- Multiple inheritance in JavaScript
- C# Example for Single Inheritance
- Single level inheritance in Java
- Difference between scheduledThread pool and Single Thread Executor.
- Difference between Single-phase and Threephase Induction Motor
- Does Python support multiple inheritance?
- Difference between Single-Cage and Double-Cage Induction Motors
- Multiple inheritance by Interface in Java
- Java Program to Implement Multiple Inheritance