Domanda di colloquio di Capgemini

What is the difference between an abstract class and an interface in Java?

Risposta di colloquio

Anonimo

9 mag 2025

I explained that an abstract class can have both implemented and abstract methods and support constructors, whereas an interface is a contract with abstract methods (Java 8+ allows default methods) and supports multiple inheritance.