MenuItem.
In Core Java, the immediate superclass of the Menu
class is the MenuItemContainer
class. The Menu
class is part of the Abstract Window Toolkit (AWT) package in Java, and it extends the MenuItemContainer
class. The MenuItemContainer
class, in turn, extends the MenuComponent
class.
So, the inheritance hierarchy is as follows:
lua
java.lang.Object
|
+-- java.awt.MenuComponent
|
+-- java.awt.MenuItemContainer
|
+-- java.awt.Menu
Therefore, the correct answer is MenuItemContainer
.