Object-Oriented Programming

What’s the Difference Between an Interface and an Abstract Class?

Interfaces vs Abstract Classes for Object-Oriented Programming

Yujian Tang
Plain Simple Software
6 min readJan 29, 2022

--

Image from Wikimedia

When I first started programming I hadn’t even heard about interfaces, much less abstract classes. However, one of the first things you should do as a junior software engineer or developer if you want to fast-track your promotions is to learn about abstractions and Object-Oriented Programming (OOP) concepts.

Two of the concepts of OOP are interfaces and abstract classes. Interfaces and abstract classes are quite similar but have different uses. In this article, we’ll cover the differences and similarities between interfaces and abstract classes and then take a deeper dive into both concepts.

Please note that most of this article will be speaking about the Java concepts of interfaces and abstract classes.

Interfaces vs Abstract Classes

Interfaces and abstract classes are both abstractions used to help define classes, but they do it in different ways. Let’s take a look at the differences and similarities of interfaces and abstract classes.

Similarities Between Interfaces and Abstract Classes

--

--