FDM Group Interview Question

Explain the differences between an abstract class and an interface in Java.

Interview Answer

Anonymous

Sep 6, 2012

An abstract class may contain instance variables and non-abstract (actually coded) methods, while an interface only contains a list of method headers, and any class implementing the interface must actually implement the interface's methods. A class may implement as many interfaces as it likes but can only have one superclass, abstract classes included.

2