Domanda di colloquio di Randstad

What are the differences between an abstract class and an interface in Java?

Risposta di colloquio

Anonimo

14 ott 2025

I explained that an abstract class can have both abstract and non-abstract methods, while an interface can only have abstract methods (before Java 8). I also mentioned that a class can implement multiple interfaces but can only extend one abstract class.