I wrote an article about that:

Abstract classes and interfaces

Summarizing:

When we talk about abstract classes we are defining characteristics of an object type; specifying what an object is.

When we talk about an interface and define capabilities that we promise to provide, we are talking about establishing a contract about what the object can do.

Answer from Jorge Córdoba on Stack Overflow
🌐
TutorialsPoint
tutorialspoint.com › when-to-use-an-abstract-class-and-when-to-use-an-interface-in-java
When to use an abstract class and when to use an interface in Java?
May 27, 2025 - If a new version of an interface ... Abstract classes have the advantage of allowing better forward compatibility. Once clients use an interface, we cannot change it; if they use an abstract class, we can still add behavior without breaking the existing code...
Discussions

When to use an interface versus an abstract class?
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/javahelp
14
11
February 22, 2022
Abstract class vs Interface in our days
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Download Microsoft Edge More info about Internet Explorer and Microsoft Edge ... 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 ... More on learn.microsoft.com
🌐 learn.microsoft.com
3
2
December 15, 2022
What is the difference between interface and abstract class - Programming & Development - Spiceworks Community
plaese tel the difference between interface class and abstrack class… if you have answer please reply me More on community.spiceworks.com
🌐 community.spiceworks.com
0
April 15, 2007
When does it make sense to use an abstract class versus an interface?
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full - best also formatted as code block You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/learnjava
17
44
June 24, 2022
Top answer
1 of 5
2

Note: please forgive the C# syntax, but the principle of the answer is the same for Java and C#.

Now when i started programming I noticed that in all subclasses i basically needed to do the exact same thing

Based on this, it seems like you think abstract classes are only allowed to declare abstract methods. This is not the case.

An abstract class is a class that cannot be instantiated directly (only its derivations can be instantiated). An abstract method is a method in an abstract class which must be implemented in the derived class.

But an abstract class can have non-abstract methods:

public abstract class Artikel
{
    public int ArtikelId { get; set; }

    public string SayHello()
    {
        return "Hi, I'm artikel " + ArtikelId;
    }
}

When you derive Artikel into subclasses, you do not need to repeat the method body of the SayHello method. Its body has been declared in the base class and can be used by all of the derived classes.

I thought of making Artikel not abstract and put an interface between Artikel and the other classes

Interfaces prevent the ability to create a common method body. If you were to use an interface:

public interface IArtikel
{
    string SayHello();
}

Then you will be required to implement this method separately in every class:

public class Book : IArtikel
{
    public string SayHello()
    {
        // custom book logic
    }
}

// And the same for all other derived classes.

It's also possible to make an seperate class which inherits from Artikel where I can put all the methods, but then there the methods would still be needed to made three times, one for each subclass right?

Don't take this the wrong way, but your attempts at solving this suggest you don't really master OOP. If this SeparateClass was created as another (4th) subclass from Artikel, how would you expect e.g. the Book class to rely on the methods found in SeparateClass?

Is it a bad design choice if I keep Artikel as abstract?

Keep Artikel abstract, but give it non-abstract methods (i.e. with method bodies) for each method that you are now copy/pasting between all of its subclasses.

2 of 5
1

You can have a base class as an abstract class which implements the Artikel interface. In the abstract class you can define the common implementation. Then you can derive LP, Book and Boardgame from that super class. In my opinion it is better to have a abstract class rather than copying the same code in all 3 sub classes.

🌐
Quora
quora.com › When-should-you-use-abstract-classes-instead-of-interfaces-and-vice-versa
When should you use abstract classes instead of interfaces and vice versa? - Quora
Answer (1 of 8): You should use interfaces only when you need to relegate ALL functionality to the program using the interface. However, if there is some concrete functionality and some functionality that will need to be supplied by the program, ...
🌐
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 - In addition to these, Java 8 new features support static and default methods in interfaces to support backward compatibility. Methods in an interface are implicitly abstract if they are not static or default and all are public.
Find elsewhere
🌐
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 - We can run an abstract class if ... have main method implementation. Interfaces are used to define contract for the subclasses whereas abstract class also define contract but it can provide other methods implementations for subclasses to use....
🌐
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 - As a general rule, you should use an abstract class when creating a base class that needs to be inherited by other classes in a class hierarchy. If you need to define a behavior that can be implemented by multiple unrelated classes, you should ...
🌐
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. Abstract classes can contain both abstract methods (methods without implementation) and concrete methods (methods with implementation). It is typically used when you want to define common functionality for a group of subclasses, but also leave some methods for those subclasses to implement.
🌐
InfoWorld
infoworld.com › home › blogs › java challengers
When to use abstract classes vs. interfaces in Java | InfoWorld
December 6, 2023 - As an example, the Java Collections Framework includes the AbstractList class, which uses the state of variables. In cases where you don’t need to maintain the state of the class, it’s usually better to use an interface.
🌐
InfoWorld
infoworld.com › home › blogs › .net programming
When to use an abstract class vs. interface in C# | InfoWorld
June 20, 2024 - The short answer: An abstract class allows you to create functionality that subclasses can implement or override. An interface only allows you to define functionality, not implement it.
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.

🌐
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 - Interfaces: Use interfaces when there is no inherent "is-a" relationship, and multiple unrelated classes need to adhere to a common contract. Interfaces promote a "can-do" relationship where classes declare what they can do without specifying ...
🌐
ProjectManagement.com
projectmanagement.com › blog-post › 69110 › interface-vs--abstract-class
ProjectManagement.com - Interface Vs. Abstract Class
May 3, 2021 - If there are any redundant elements in subclasses, or if any arise in the future, you can easily eliminate said redundancies by moving them into the base (Abstract) Class. You cannot typically do this with an Interface. If, on the other hand you need to mark a class as a candidate for interacting with a provided service (either from an existing framework, or something you provide) then use an Interface type.
🌐
TypeScript Tutorial
typescripttutorial.net › home › typescript tutorial › interfaces vs abstract classes
Interfaces vs Abstract Classes
August 10, 2023 - In this tutorial, you'll learn about the differences between interfaces and abstract classes in TypeScript.
🌐
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 - Interfaces and abstract classes serve different purposes in OOP. While interfaces focus on defining contracts for behavior, abstract classes provide a balance between common implementation and the flexibility to extend functionality.
🌐
DevOps.dev
blog.devops.dev › abstract-class-vs-interface-c07c6ddc8f18
Abstract class vs Interface
September 3, 2025 - Use an abstract class when you want to provide a common base with some default behavior for subclasses. Use an interface when you want to define a contract that classes must adhere to, without specifying any implementation details.
🌐
C# Corner
c-sharpcorner.com › blogs › difference-between-abstract-class-interfaces
In What Scenarios Will You Use Abstract Class vs Interface
An interface is good for small or medium level projects. Main Difference An Abstract Class should be used for a large project to share the common functionality with its derived class.
🌐
Spiceworks
community.spiceworks.com › programming & development
What is the difference between interface and abstract class - Programming & Development - Spiceworks Community
April 15, 2007 - plaese tel the difference between interface class and abstrack class… if you have answer please reply me