[url=http://www.javaworld.com/javaworld/javaqa/2001-04/03-qa-0420-abstract.html]Abstract classes vs. interfaces: When does it make sense to choose an abstract class over an interface?[/url]
[url=http://www.javaworld.com/javaworld/javaqa/2001-08/03-qa-0831-interface.html]Abstract classes and interfaces practicum: Move from theory to practice on when to employ abstract classes vs. interfaces[/url]
[url=http://java.sun.com/developer/JDCTechTips/2001/tt1106.html#tip2]Tech Tips: ABSTRACT CLASSES VS. INTERFACES[/url]
~
> Joe Doe would know that using an abstract class would
> force the user to extend that class and due to
> single-inheritance amoung classes, only that class.
>
> Using interfaces lets the implementor using a
> class-inheritance of his choice - would Joe Doe argue.
That Joe Doe is a smart guy. I bet he uses Google.
> Can somebody tell me, then, why Joe Doe would want to
> use an interface over an abstract class?
The main reason is a limitation in the Java inheritance model namely that you can inherit one class only but as many interfaces as you want. This can be characterized as: single inheritance of implementation but multiple inheritance of type. The latter is considered the most important in OO design so the fact that you can inherit implementation from from one source only isn't that much of a limitation really .
So to make use of multiple inheritance of type in Java you need to use interfaces (and possibly one class).