Interview Questions - Advanced Java

45.
Can an anonymous class be declared as implementing an interface and extending a class?
An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.

46.
What is the immediate superclass of Menu?
MenuItem.

47.
What is the purpose of finalization?
The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.

48.
Which class is the immediate superclass of the MenuComponent class?
Object.