Question d’entretien chez Amazon

Standard OOPS concepts like diff between interface and abstract class.

Réponses aux questions d'entretien

Utilisateur anonyme

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

Utilisateur anonyme

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

Utilisateur anonyme

2 juil. 2011

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