Amazon interview question

Standard OOPS concepts like diff between interface and abstract class.

Interview Answers

Anonymous

8 Sept 2011

An abstract class is a class that can't be instantiated directly and must be inherited to create a concrete class. An interface is an abstract class which provides no default implementation and just specifies the functionality a concrete class much implement.

1

Anonymous

28 Sept 2011

I believe the best answer would be to say Interface does not have any default definition for a function whereas abstract class can.. So when we need to define some sort of default implementation, abstract class are better than interfaces. What SCH is correct too

1

Anonymous

2 July 2011

An interface is a group of related methods with empty bodies. An abstract class is a class that is declared abstract.