Interfaces vs. Abstract Classes

Learn about the difference between abstract classes and interfaces.

Previously, we learned that abstract classes and interfaces are similar because both provide abstract methods that can only be implemented in the child classes. However, they still differ in the following ways:

  • Interfaces can include abstract methods and constants, but they can’t contain concrete methods and properties.
  • All the methods in the interface must be in the public visibility scope.
  • A class can implement more than one interface, while it can inherit from only one abstract class.

Let’s look at the illustration below to better understand the difference between interfaces and abstract classes.

Get hands-on with 1400+ tech skills courses.