Examlex

Solved

What Is Wrong with the Following Code? Class ExitListener Implements

question 9

Multiple Choice

What is wrong with the following code? class ExitListener implements ActionListener
{
Public void actionPerformed(ActionEvent event)
{
System.exit(0) ;
}
}
ActionListener exitListener = new ExitListener() ;
JMenu exitMenu = new JMenu("Exit") ;
ExitMenu.addActionListener(exitListener) ;
JMenuBar menuBar = new JMenuBar() ;
MenuBar.add(exitMenu) ;


Definitions:

Interest Expense

This is the cost incurred by an entity for borrowed funds over a period of time, typically expressed as an annual percentage.

Cost Of Goods Sold

The direct costs attributable to the production of the goods sold in a company, including materials and labor.

Dividends Paid

The part of a company's profits paid out to shareholders, typically as cash or shares.

Interest Expense

The cost incurred by an entity for borrowed funds; it is the price paid for the use of borrowed money, or, for corporations, the price paid for the use of borrowed capital.

Related Questions