158k views
4 votes
When you extend an interface, you must implement all the methods defined in the interface. If you are interested in only one or two mouse events, you can extend the ________ class which implements the Mouse Listener interface, but does not require you to write all the functions in the interface. a. Mouse Adapter b. Mouse Extender c. Mouse Motion Adapter d. Mouse Motion Extender

User Cyberbemon
by
4.7k points

1 Answer

1 vote

Answer: (A) Mouse adapter

Step-by-step explanation:

The mouse Adapter is the type of abstract class of the Adapter class that are used for receiving the various types of mouse events. In this class, all the methods are empty.

When we wanted to extend an interface of the class, then we must implemented all the given methods that are available in an interface.

But we want to make changes in the mouse events we can also extend the mouseAdapter class. This type of class are also convenient for creating the interface of the listener objects of the mouse and also it does not required to writing all the given function.

User Nabster
by
5.3k points