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
🌐
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.
🌐
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 ...
🌐
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?
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...
🌐
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.
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.

Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › java › difference-between-abstract-class-and-interface-in-java
Difference Between Abstract Class and Interface in Java - GeeksforGeeks
Can have member variables: Abstract classes can have member variables, which are variables that belong to an instance of the class. These variables can be final, non-final, static, or non-static. Can be used as a base class: Abstract classes can be used as a base class for other classes, which means they can be inherited by other classes. This allows for code reuse and the creation of a common interface or behavior for related classes.
Published   July 23, 2025
🌐
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.
🌐
ProjectManagement.com
projectmanagement.com › blog-post › 69110 › interface-vs--abstract-class
ProjectManagement.com - Interface Vs. Abstract Class
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.
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.

🌐
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.
🌐
Codefinity
codefinity.com › blog › Interface-vs-Abstract-Class
Interface vs Abstract Class
Here’s a more detailed comparison ... the design intention. Use interfaces when you need to establish a contract across a broad range of unrelated classes, ensuring they all adhere to a specific protocol....
🌐
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 ...
🌐
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 - An interface is used to define a contract that must be followed. It’s like a list of actions that a class should perform but doesn’t dictate how. An abstract class, on the other hand, allows you to define both common behavior and a contract.
🌐
The Knowledge Academy
theknowledgeacademy.com › blog › abstract-class-vs-interface-java
Abstract Class vs Interface Java: A Detailed Comparison
You can use Abstract Classes when you want to provide shared implementation and create a hierarchical class structure. In contrast, interfaces are preferable for defining contracts unrelated classes, further promoting flexibility and multiple ...
🌐
Javatpoint
javatpoint.com › difference-between-abstract-class-and-interface
Abstract vs Interface - javatpoint
Difference between Abstract class and Interface or difference between interface and abstract class in java or abstract class vs interface in abstraction with example of abstract class and example of interface,abstract class vs interface in java, example of abstract class and interface in java
🌐
Better Programming
betterprogramming.pub › choosing-between-interface-and-abstract-class-7a078551b914
Choosing Between an Interface and an Abstract Class | by Peterson ...
December 11, 2019 - That means any class that implements an interface guarantees and must provide some implementation for all of its methods. All methods in an interface must be public and abstract. ... public interface Movable { public void accelerate(); public void decelerate(); }public interface Drivable{ public void drive(); } ... Advice for programmers. ... Husband, father, engineer, musician, and writer by luck. I write mostly about whatever comes to mind.