Friday 6 July 2012

Describe what an Interface is and how it’s different from a Class?

Purpose:
  • This question is positioned by Scott as a Mid-Level question but in reality it should apply to juniors too.
  • It is a basic teaser question to see if a developer has developed anything more sophisticated than a simple application. A lack of interface awareness or use could point to either a developer being very junior or being a code-by-google kind of single point developer that has a low level of understanding of what they are actually doing.

Potential Answer:
Interface defines a contract and does not have any executable code of its own. Class is concrete implementation representing single concept that can inherit from single parent and can implement multiple interfaces.

No comments:

Post a Comment