Pergunta de entrevista da empresa Apple

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

Respostas da entrevista

Sigiloso

11 de nov. de 2013

Class - definition of object Abstract class - partially defined (incomplete - definitions without implementation) Interface - blueprint of class without any implementation

7

Sigiloso

4 de dez. de 2014

Class is code and definition of an object An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed. An interface indicates that the inheriting children is capable of doing something (no property)

Sigiloso

17 de jan. de 2013

Combining all three, the basic difference is that class can implement more than one interface but can only inherit from only 1 base class.