How about an analogy: when I was in the Air Force, I went to pilot training and became a USAF (US Air Force) pilot. At that point I wasn't qualified to fly anything, and had to attend aircraft type training. Once I qualified, I was a pilot (Abstract class) and a C-141 pilot (concrete class). At one of my assignments, I was given an additional duty: Safety Officer. Now I was still a pilot and a C-141 pilot, but I also performed Safety Officer duties (I implemented ISafetyOfficer, so to speak). A pilot wasn't required to be a safety officer, other people could have done it as well.

All USAF pilots have to follow certain Air Force-wide regulations, and all C-141 (or F-16, or T-38) pilots 'are' USAF pilots. Anyone can be a safety officer. So, to summarize:

  • Pilot: abstract class
  • C-141 Pilot: concrete class
  • ISafety Officer: interface

added note: this was meant to be an analogy to help explain the concept, not a coding recommendation. See the various comments below, the discussion is interesting.

Answer from Jay on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › java › difference-between-abstract-class-and-interface-in-java
Difference Between Abstract Class and Interface in Java - GeeksforGeeks
As we know that abstraction refers to hiding the internal implementation of the feature and only showing the functionality to the users. i.e., showing only the required features, and hiding how those features are implemented behind the scene. Whereas, an Interface is another way to achieve abstraction in Java. Both abstract class and interface are used for abstraction.
Published   July 23, 2025
Top answer
1 of 16
968

How about an analogy: when I was in the Air Force, I went to pilot training and became a USAF (US Air Force) pilot. At that point I wasn't qualified to fly anything, and had to attend aircraft type training. Once I qualified, I was a pilot (Abstract class) and a C-141 pilot (concrete class). At one of my assignments, I was given an additional duty: Safety Officer. Now I was still a pilot and a C-141 pilot, but I also performed Safety Officer duties (I implemented ISafetyOfficer, so to speak). A pilot wasn't required to be a safety officer, other people could have done it as well.

All USAF pilots have to follow certain Air Force-wide regulations, and all C-141 (or F-16, or T-38) pilots 'are' USAF pilots. Anyone can be a safety officer. So, to summarize:

  • Pilot: abstract class
  • C-141 Pilot: concrete class
  • ISafety Officer: interface

added note: this was meant to be an analogy to help explain the concept, not a coding recommendation. See the various comments below, the discussion is interesting.

2 of 16
822

While your question indicates it's for "general OO", it really seems to be focusing on .NET use of these terms.

In .NET (similar for Java):

  • interfaces can have no state or implementation
  • a class that implements an interface must provide an implementation of all the methods of that interface
  • abstract classes may contain state (data members) and/or implementation (methods)
  • abstract classes can be inherited without implementing the abstract methods (though such a derived class is abstract itself)
  • interfaces may be multiple-inherited, abstract classes may not (this is probably the key concrete reason for interfaces to exist separately from abtract classes - they permit an implementation of multiple inheritance that removes many of the problems of general MI).

As general OO terms, the differences are not necessarily well-defined. For example, there are C++ programmers who may hold similar rigid definitions (interfaces are a strict subset of abstract classes that cannot contain implementation), while some may say that an abstract class with some default implementations is still an interface or that a non-abstract class can still define an interface.

Indeed, there is a C++ idiom called the Non-Virtual Interface (NVI) where the public methods are non-virtual methods that 'thunk' to private virtual methods:

  • http://www.gotw.ca/publications/mill18.htm
  • http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Non-Virtual_Interface
Discussions

Abstract class vs Interface in our days
There are lots of answers about this question, but they are very old. Having c# 11 there are many new features with Interfaces. So, maybe someone can exactly explaine me the difference between an Abstract class and an Interface? When should i use the… More on learn.microsoft.com
🌐 learn.microsoft.com
3
2
December 15, 2022
object oriented design - What are the differences between abstract classes, interfaces, and when to use them - Software Engineering Stack Exchange
Recently I have started to wrap my head around OOP, and I am now to the point where the more I read about the differences between abstract classes and interfaces the more confused I become. So far, More on softwareengineering.stackexchange.com
🌐 softwareengineering.stackexchange.com
November 3, 2012
Whats the difference between Interface and Abstract class? Are they not use the same way?
my understanding is an abstract class will have methods implemented (actually contain code) but the class can never be instantiated itself. other classes can inherit from an abstract class and then use these methods (or over ride them). An interface simply says what methods need to be implemented, I always think of it as a contract stating what needs to be fulfilled when using that interface. More on reddit.com
🌐 r/csharp
48
17
October 29, 2020
Abstract class vs interface - C++ Forum
Can someone explain why you would use an interface instead of an abstract class? I can't quite see the point, as the interface doesn't do anything the abstract class coudln't do. Please show snippets of code so I can understand the difference better. More on cplusplus.com
🌐 cplusplus.com
February 22, 2015
🌐
QuickStart
quickstart.com › blog › software-engineering › when-and-how-to-use-abstract-class-and-interface
Abstract Classes vs. Interfaces: Decoding the OOP Dilemma in Software Engineering | QuickStart
September 24, 2024 - Abstract classes provide a blueprint for classes, allowing a mix of abstract and concrete methods, while interfaces define contracts for classes, supporting multiple inheritance and enforcing method implementation.
🌐
Medium
medium.com › @nwonahr › interfaces-vs-abstract-classes-in-c-whats-the-difference-and-when-to-use-them-9af5ab21b1f9
Interfaces vs Abstract Classes in C#: What’s the Difference and When to Use Them | by Richard Nwonah | Medium
September 22, 2024 - If we add a Rectangle class later, it can implement the same interface but with a different implementation. An abstract class allows us to define both the implementation and the contract for derived classes.
Top answer
1 of 3
4

I like to think of interfaces as contracts (this object will have property X & Y and method Z) but makes no assumptions about implementation (at least they did before Default Interface Implementations as of C# 8: https://devblogs.microsoft.com/dotnet/default-implementations-in-interfaces, although I use these sparingly if ever).

Abstract classes (and derived non-sealed classes) can be thought of as just a place to share implementation that's common between supersets of classes and their subsets. Abstract classes provide an object-oriented way of supporting the Don't Repeat Yourself (DRY) principle (https://www.c-sharpcorner.com/article/software-design-principles-dry-kiss-yagni) where the implementation you would otherwise repeat doesn't make sense outside of the context of your class hierarchy.

Interfaces & abstract classes are by no means mutually exclusive and can be used in conjunction with each other depending on the context.

2 of 3
1

abstract classes are to define a common base class for inheritance, without implementing any actual methods.

because c# does not support multiple inheritance, interfaces are the solution. a class can inherit from one base class, but it can implement many interfaces. interfaces can only be implemented. an interface can not inherit from another interface.

due to issues with inheritance chains, inheritance is often considered an anti-pattern, interface design is recommend instead. with interface design you define contacts that define properties and methods. then classes must implement. other languages use protocols/traits which are slight more feature rich than interfaces.

one past advantage with classes, was you could define default behavior, and interfaces were abstract (no implementations). But modern C# allows default implemations for interfaces.

so my recommendation is to avoid class inheritance (and never more than 1 deep, that is only inherit from base), but rather use interfaces and extension methods to extend classes.

🌐
InfoWorld
infoworld.com › home › blogs › .net programming
When to use an abstract class vs. interface in C# | InfoWorld
June 20, 2024 - Nor can you have any member data in an interface. Whereas an abstract class may contain method definitions, fields, and constructors, an interface may only have declarations of events, methods, and properties.
Find elsewhere
🌐
C# Corner
c-sharpcorner.com › article › abstract-class-vs-interface-c-sharp
Abstract Class Vs Interface in C#
September 6, 2023 - Abstract class keywords are used to create Abstract Classes. ... The interface will give the compile time error “Interfaces cannot contain fields” because it will not allow fields.
Top answer
1 of 6
38

In layman's terms:

Interfaces are for "can do/can be treated as" type of relationships.

Abstract ( as well as concrete ) classes are for "is a" kind of relationship.

Look at these examples:

class Bird extends Animal implements Flight;
class Plane extends Vehicle implements Flight, AccountableAsset;
class Mosquito extends Animal implements Flight;
class Horse extends Animal;
class RaceHorse extends Horse implements AccountableAsset;
class Pegasus extends Horse implements Flight;

Bird, Mosquito and Horse are Animals. They are related. They inherit common methods from Animal like eat(), metabolize() and reproduce(). Maybe they override these methods, adding a little extra to them, but they take advantage of the default behavior implemented in Animal like metabolizeGlucose().

Plane is not related to Bird, Mosquito or Horse.

Flight is implemented by dissimilar, unrelated classes, like Bird and Plane.

AccountableAsset is also implemented by dissimilar, unrelated classes, like Plane and RaceHorse.

Horse doesn't implement Flight.

As you can see classes (abstract or concrete) helps you build hierarchies, letting you inhering code from the upper levels to the lower levels of the hierarchy. In theory the lower you are in the hierarchy, the more specialized your behavior is, but you don't have to worry about a lot of things that are already taken care of.

Interfaces, in the other hand, create no hierarchy, but they can help homogenize certain behaviors across hierarchies so you can abstract them from the hierarchy in certain contexts.

For example you can have a program sum the value of a group of AccountableAssets regardless of their being RaceHorses or Planes.

2 of 6
13

You could deduce the answer logically since you seem to be aware of the differences between the two.

Interfaces define a common contract. Such as an interface called IAnimal, where all animals share functions such as Eat(), Move(), Attack() etc. While all of them share the same functions, all or most of them have a different way (implementation) of achieving it.

Abstract classes define a common implementation and optionally common contracts. For example a simple Calculator could qualify as an abstract class which implements all the basic logical and bitwise operators and then gets extended by ScientificCalculator, GraphicalCalculator and so on.

If you have common implementation then by all means, encapsulate the functionality in an abstract class to extend from. I have near 0 PHP experience, but i don't think you can create interfaces with non constant fields. If the fields are common between your instance classes then you are forced to use an Abstract class, unless you define access to them via getters and setters.

Also, there seems to be no shortage of results in Google.

🌐
Medium
harsh05.medium.com › abstract-classes-vs-interfaces-in-java-when-and-how-to-use-them-5ca5d5c825b5
Abstract Classes vs Interfaces in Java: When and How to Use Them | by @Harsh | Medium
October 10, 2024 - Along the way, I also explored how multiple inheritance, although not directly supported in Java, can be achieved using interfaces. ... An abstract class in Java is a class that cannot be instantiated on its own. Instead, it serves as a blueprint for other classes that extend it.
🌐
Reddit
reddit.com › r/csharp › whats the difference between interface and abstract class? are they not use the same way?
r/csharp on Reddit: Whats the difference between Interface and Abstract class? Are they not use the same way?
October 29, 2020 - Traditionally, interfaces don't ... The facade pattern is a great use case to study. Abstract classes, on the other hand, allow us to offer some common implementations....
🌐
SAP Community
community.sap.com › t5 › application-development-and-automation-discussions › difference-between-abstract-class-interface › m-p › 2993782
difference between abstract class & Interface? - SAP Community
November 27, 2021 - an interface contains <b>no implementation</b>, just the definition. The definition is the name of the class, the name of the methods, the name and type of the class attributes and the method parameters.
🌐
Baeldung
baeldung.com › home › java › core java › using an interface vs. abstract class in java
Using an Interface vs. Abstract Class in Java | Baeldung
June 24, 2025 - Abstract classes have no restrictions on field and method modifiers, while in an interface, all are public by default. We can have instance and static initialization blocks in an abstract class, whereas we can never have them in the interface.
🌐
LinkedIn
linkedin.com › pulse › what-difference-between-interface-abstract-class-david-ramazani
What is the difference between Interface and Abstract class?
January 22, 2021 - An Abstract class is similar to the Interface but it's more expanded. These classes can have Abstract methods that are similar to the Interface declared only and must be rewritten in derived classes.
🌐
Cplusplus
cplusplus.com › forum › beginner › 157568
Abstract class vs interface - C++ Forum
February 22, 2015 - In general an abstract class is used to define an implementation and is intended to be inherited from by concrete classes. It's a way of forcing a contract between the class designer and the users of that class Interface An interface has no implementation. An interface class contains only a ...
🌐
Quora
quora.com › How-do-I-explain-the-difference-between-interface-and-abstract-class-in-an-interview-with-5-years-of-experience
How to explain the difference between interface and abstract class in an interview with 5 years of experience - Quora
In modern Java, that is 2023 ish Java, one can implement what very well was impossible to do with an interface in 2010 give or take. You can actually implement algorithms. So in 2010, the answer was Abstract classes are stateful algorithm machines. ...
🌐
DevGenius
blog.devgenius.io › interface-vs-abstract-class-in-oop-5d1b971d8e83
Interface vs. Abstract Class in OOP | by Jiyan Epözdemir | Dev Genius
April 7, 2025 - Opt for an interface when you need to define contracts for unrelated classes, enforce method signatures only, and support multiple behaviors or contracts through multiple inheritance.
🌐
DigitalOcean
digitalocean.com › community › tutorials › difference-between-abstract-class-and-interface-in-java
Difference between Abstract Class and Interface in Java | DigitalOcean
August 4, 2022 - Abstract class have all the features of a normal java class except that we can’t instantiate it. We can use abstract keyword to make a class abstract but interfaces are a completely different type and can have only public static final constants and method declarations.
🌐
InfoWorld
infoworld.com › home › blogs › java challengers
When to use abstract classes vs. interfaces in Java | InfoWorld
December 6, 2023 - Interfaces are a kind of code contract, which must be implemented by a concrete class. Abstract classes are similar to normal classes, with the difference that they can include abstract methods, which are methods without a body.
🌐
ByteHide
bytehide.com › home › abstract class vs interface in c#: pros and cons
Abstract Class vs Interface in C#: Pros and Cons
March 27, 2025 - Abstract classes can have constructors, while interfaces cannot. Abstract classes can have fields and properties, while interfaces can only have properties.