Multiple Choice
Consider the following code snippet: public class ClickListener implements ActionListener
{
Public void actionPerformed(ActionEvent event)
{
System.out.println("I was clicked.") ;
}
}
Public class ButtonTester
{
Public static void main(String[] args)
{
JFrame frame = new JFrame() ;
JButton button = new JButton("Click me!") ;
Frame.add(button) ;
ActionListener listener = new ClickListener() ;
Button.addActionListener(listener) ;
) ..
}
}
Which of the following statements is correct?
A) Class ButtonTester is an interface type.
B) A ClickListener object can be added as a listener for the action events that buttons generate.
C) Class ClickListener is an interface type.
D) Class ButtonTester implements an interface type.
Correct Answer:

Verified
Correct Answer:
Verified
Q44: Which of the following is an event
Q45: Which of the following statements about a
Q46: Consider the following code snippet: public class
Q47: Consider the following declarations: public interface Encryptable<br>{<br>Void
Q48: Which of the following statements about an
Q50: A method that has no implementation is
Q51: Which of the following is a good
Q52: Suppose you are writing an interface called
Q53: The methods of a/an _ describe the
Q54: Consider the following code snippet: class MouseClickedListener