title: How should I have explained the difference between an Interface and an Abstract class?
body: <p>In one of my interviews, I have been asked to explain the difference between an <strong>Interface</strong> and an <strong>Abstract class</strong>.</p>
  
  <p>Here's my response:</p>
  
  <blockquote>
    <p>Methods of a Java interface are implicitly abstract
     and cannot have implementations. A Java abstract class can have
     instance methods that implements a default behaviour.</p>
    
    <p>Variables declared in a Java interface are by default final. An 
     abstract class may contain non-final variables.</p>
    
    <p>Members of a Java interface are public by default. A Java abstract
     class can have the usual flavours of class members like private,
     protected, etc.</p>
    
    <p>A Java interface should be implemented using keyword “implements”; A
    Java abstract class should be extended using keyword “extends”.</p>
    
    <p>An interface can extend another Java interface only, an abstract class
     can extend another Java class and implement multiple Java interfaces.</p>
    
    <p>A Java class can implement multiple interfaces but it can extend only
     one abstract class.</p>
  </blockquote>
  
  <p>However, the interviewer was not satisfied, and told me that this description represented "<em>bookish knowledge</em>".</p>
  
  <p>He asked me for a more practical response, explaining <em>when I would choose an abstract class over an interface, using practical examples</em>.</p>
  
  <p>Where did I go wrong?</p>