Multiple Choice
Consider the following code snippet: class MouseClickedListener implements ActionListener
{
Public void mouseClicked(MouseEvent event)
{
Int x = event.getX() ;
Int y = event.getY() ;
Component.moveTo(x,y) ;
}
}
What is wrong with this code?
A) The mouseClicked method cannot access the x and y coordinates of the mouse.
B) repaint() method was not called.
C) The class has implemented the wrong interface.
D) There is nothing wrong with this code.
Correct Answer:

Verified
Correct Answer:
Verified
Q49: Consider the following code snippet: public class
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
Q55: Which of the following statements about converting
Q56: Assume that the TimerListener class implements the
Q57: _ are generated when the user presses
Q58: Consider the following class: public class ClickListener
Q59: Which container is used to group multiple