This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The Component class implements the MenuContainer interface,why Frame class continue to implement the MenuContainer interface.I think Frame extneds from Component class,it automatically have the property of MenuContainer.So the other subclasses of Compoent can add Menu in their container.True of False.Why? Thank you.
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