posted 24 years ago
Maha Anna's post gives an explanation for the specific case of menus, but can anybody give a more general explanation? I'll rephrase the question:
What is the point of implementing an interface in a subclass when a superclass has already implemented that interface?
I've seen this construct used in other places in the core library. For instance, <code>AbstractList</code> implements the <code>List</code> interface and so do <code>ArrayList</code> and <code>LinkedList</code>, both of which inherit from <code>AbstractList</code>. Here's another example from the Collections API - <code>AbstractMap</code> implements <code>Map</code> and so do <code>HashMap</code> and <code>WeakHashMap</code>.
In all 3 of these examples (counting the menu classes), the topmost implementor is <code>abstract</code> and the subclasses are not. Does this have something to do with it?
jply