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:

DNA

Deoxyribonucleic acid, the molecule that contains the genetic instructions used in the growth, development, functioning, and reproduction of all known living organisms and many viruses.

Biomarker

Biological molecules found in blood, other body fluids, or tissues that are a sign of a normal or abnormal process, or of a condition or disease.

Alzheimer's Disease

A progressive neurological disorder that causes the brain to shrink and brain cells to die, resulting in severe memory loss and cognitive decline.

Creutzfeldt-Jakob Disease

An uncommon, progressive, always lethal brain disease that impacts roughly one out of every million individuals annually.

Related Questions