Pregunta de entrevista de Amazon

Standard OOPS concepts like diff between interface and abstract class.

Respuestas de entrevistas

Anónimo

8 de sept de 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

Anónimo

28 de sept de 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

Anónimo

2 de jul de 2011

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