Apple Interview Question: What is the difference betwee... | Glassdoor

Interview Question

Software Engineer Interview Cupertino, CA

What is the difference between a class, an abstract class

 , and an interface?

Interview Answer

3 Answers


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

Ghanish Singla on Jan 17, 2013

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

Anonymous on Nov 11, 2013

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)

Anonymous on Dec 4, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.