Pregunta de entrevista de LBi Software

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

Respuesta de la entrevista

Anónimo

12 abr 2019

There are 3 main differences, 1. An abstract class can't ever be instantiated, while an interface may be anonymoulsy instantiated. 2. Attributes in an abstract class can be non-final while attributes in an interface are final by default. 3. Methods from an abstract class may have a default behavior, while methods in an interface are implicitly abstract and may not have a default behavior.