employer cover photo
employer logo
employer logo

Palantir Technologies

Is this your company?

Palantir Technologies interview question

What is the difference between interface and abstract class

Interview Answer

Anonymous

19 Nov 2012

An interface provides definitions of methods without a body. It has no constants or fields. In contrast, abstract classes can have both methods that provide default behavior and abstract classes that are methods without a body. They create a planned inheritance hierarchy. One consideration is that a class can inherit multiple interfaces but just one abstract class. Here are some more resources: http://docs.oracle.com/javase/tutorial/java/IandI/usinginterface.html