Interview Question

Java Developer Interview New York, NY

Explain the differences between an abstract class and an

  interface in Java.
Answer

Interview Answer

1 Answer

0

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.

Interview Candidate on Sep 6, 2012

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up