Domanda di colloquio di Deloitte

Abstraction and diff between abstract class and Interface.

Risposta di colloquio

Anonimo

29 feb 2016

Abstract classes provide very strong IS-A relationship and Interfaces can be seen as capabilities. When one need to give abstraction with some pre-defined functionalities we can should use abstract classes else interfaces can be used. So when there are similar kinds like we use abstract classes and if they also require different kind of capabilities(functionalities) we can provide it by interfaces. and sooo on.... explained them java specific rules of creating abstract classes and interfaces

14