Solved

If the Method MakeMenuItem Is Called Four Times, How Many

Question 4

Multiple Choice

If the method makeMenuItem is called four times, how many MyMenuListener objects will be created? public JMenuItem makeMenuItem(String menuLabel)
{
JMenuItem mi = new JMenuItem(menuLabel) ;
Class MyMenuListener implements ActionListener
{
Public void actionPerformed(ActionEvent


A) 1
B) 2
C) 3
D) 4
E) {
DoSomething() ;
}
}
Mi) addActionListener(new MyMenuListener() ) ;
Return mi;
}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions