Interview Question

Software Developer Co-Op Interview Ottawa, ON (Canada)

What is the difference between an interface and an abstract

  class
Tags:
java
Answer

Interview Answer

1 Answer

0

An Abstract Class can contain default Implementation where as an Interface should not contain any implementation at all. An Interface should contain only definitions but no implementation. where as an abstract class can contain abstract and non-abstract methods. When a class inherits from an abstract the derived class must implement all the abstract methods declared in the base class. an abstract class can inherit from another non-abstract class.

harsha on Jun 23, 2010

Add Answers or Comments

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