In the book of Khalid A.Mughal , there is a question as it : Which of these methods are not available in an instance of the Container class ? :
(a) Component add(Component comp) (b) Component add(Component comp,int index) (c) void add(Object constraints,Component comp) (d) void add(Component comp, Object constraints,int index) (e) void add(PopupMenu popup) for me the answer is c and d, but the correct anszer ic only c in the book and there is an explanation where it says so method (e) is inherited from Component. therefore e is so wrong..... I do a mistake ? can you tell about it. Thanks.
Indeed, check the API Spec for the Container class. As for answer E, as that method is inherited from Component, that method is available through an instance of Container, even though it isn't defined within Container. If you have more questions, please ask. I hope that helps, Corey