In the Effective Java book it is written:
Existing classes can be easily retrofitted to implement a new interface. All you have to do is add the required methods if they don’t yet exist and add an implements clause to the class declaration. For example, many existing classes were retrofitted to implement the Comparable interface when it was introduced into the platform. Existing classes cannot, in general, be retrofitted to extend a new abstract class. If you want to have two classes extend the same abstract class, you have to place the abstract class high up in the type hierarchy where it subclasses an ancestor of both classes. Unfortunately, this causes great collateral damage to the type hierarchy, forcing all descendants of the common ancestor to extend the new abstract class whether or not it is appropriate for them to do so.
I don't see a difference between an abstract class and an interface here. Just, we can replace the highlighted word class
with interface
and everything further is still true.
+--------------+
|Abstract Class|
+--------------+
^ ^
| |
+------+ +------+
|Class1| |Class2|
+------+ +------+
+--------------+
| Interface |
+--------------+
^ ^
| |
+------+ +------+
|Class1| |Class2|
+------+ +------+
What is a difference?