Java Multiple Inheritance Keyword

Benjamin Jul 11, 2026

In the realm of object-oriented programming, inheritance is a powerful feature that allows classes to inherit properties and behaviors from other classes. While single inheritance is straightforward in Java, multiple inheritance can be a bit more complex. The keyword used to achieve multiple inheritance in Java is 'implements'.

10 Example of this keyword in Java
10 Example of this keyword in Java

Before we dive into the 'implements' keyword, let's first understand why Java doesn't support multiple inheritance through classes, and how it handles this limitation.

three different types of inferiances are shown on the diagram, and one is labeled
three different types of inferiances are shown on the diagram, and one is labeled

Understanding Java's Approach to Multiple Inheritance

Java doesn't support multiple inheritance through classes to avoid ambiguity and complexity. However, it does allow multiple inheritance through interfaces, which is where the 'implements' keyword comes into play.

Inheritance in Java
Inheritance in Java

Interfaces in Java are like blueprints for classes. They contain only abstract methods (no method bodies) and static final variables (constants). A class can implement multiple interfaces, achieving a form of multiple inheritance.

Interfaces in Java

What is Inheritance in Java with example - Object Oriented Programming Tutorial
What is Inheritance in Java with example - Object Oriented Programming Tutorial

Interfaces in Java are defined using the 'interface' keyword. They look like this:

public interface MyInterface { void myMethod(); }

A class can implement multiple interfaces like this:

What is the Difference Between Abstract Class and Interface in Java - Pediaa.Com
What is the Difference Between Abstract Class and Interface in Java - Pediaa.Com

public class MyClass implements MyInterface1, MyInterface2 { // class body }

Implementing Multiple Interfaces

When a class implements multiple interfaces, it must provide implementations for all the methods declared in those interfaces. If there are methods with the same signature in multiple interfaces, the class must provide a single implementation for that method.

What is Inheritance in Java – 5 Types, Use and Advantages
What is Inheritance in Java – 5 Types, Use and Advantages

Here's an example:

public interface Interface1 { void myMethod(); }

Java Final Keyword Cheat Sheet – Explained Simply
Java Final Keyword Cheat Sheet – Explained Simply
Famous Keywords in Java
Famous Keywords in Java
types of inheritance 💪
types of inheritance 💪
Types of Inheritance in Java | OOP Concepts Explained
Types of Inheritance in Java | OOP Concepts Explained
Types of Inheritance in Java: A Comprehensive Guide
Types of Inheritance in Java: A Comprehensive Guide
the key words in this language are used to describe something
the key words in this language are used to describe something
Types of Inheritance in Programming
Types of Inheritance in Programming
Inheritance in Java Explained | OOP Concepts for Beginners
Inheritance in Java Explained | OOP Concepts for Beginners
Type of Inheritance in Python
Type of Inheritance in Python
Java List of Keywords (All Reserved Words) | Complete Java Reference Guide
Java List of Keywords (All Reserved Words) | Complete Java Reference Guide
Inheritance in Java
Inheritance in Java
OOP Inheritance Types Explained – Single, Multiple, Hybrid & More
OOP Inheritance Types Explained – Single, Multiple, Hybrid & More
Inheritance In JAVA
Inheritance In JAVA
10 Examples of Inheritance in Java 🔗
10 Examples of Inheritance in Java 🔗
Static Keyword In Java : All Scenarios
Static Keyword In Java : All Scenarios
The new keyword in Java programming language - Codeforcoding
The new keyword in Java programming language - Codeforcoding
Hierarchical Inheritance in Java: How It Works and Why It Matters
Hierarchical Inheritance in Java: How It Works and Why It Matters
the different types of children's names and their meanings are shown in this diagram
the different types of children's names and their meanings are shown in this diagram
Java Exception Keywords
Java Exception Keywords
Java Inheritance - Learn its Importance and Types with Coding Examples.
Java Inheritance - Learn its Importance and Types with Coding Examples.

public interface Interface2 { void myMethod(); }

public class MyClass implements Interface1, Interface2 { @Override public void myMethod() { // implementation } }

Using the 'implements' Keyword with Abstract Classes

Java also allows a class to extend multiple abstract classes using the 'extends' keyword, but only if the abstract classes have no common methods. If there are common methods, the class must implement those methods.

Here's an example:

public abstract class AbstractClass1 { void method1() { // implementation } }

public abstract class AbstractClass2 { void method2() { // implementation } }

public class MyClass extends AbstractClass1, AbstractClass2 { // class body }

In conclusion, while Java doesn't support multiple inheritance through classes, it provides a way to achieve similar functionality through interfaces and abstract classes. The 'implements' keyword is crucial in this context, allowing classes to implement multiple interfaces and abstract classes. Understanding and using these features effectively can lead to more flexible and maintainable code.