Frage im Vorstellungsgespräch bei FDM Group

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

Antwort im Vorstellungsgespräch

Anonym

6. Sept. 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