PrepZone Logo
PrepZone
Back to Java

Java · Medium

After Java 8 default methods, when should you prefer an abstract class over an interface?

JavaOOPJava 8+

Answer preview

After Java 8 default methods, interfaces can have concrete behavior. Abstract classes still have a role when shared state or non-public API is needed.…