Given the following six method names:
* addListener
* addMouseListener
* setMouseListener
* deleteMouseListener
* removeMouseListener
* registerMouseListener
How many of these method names follow JavaBean Listener naming rules?
A.
1
B.
2
C.
3
D.
4
E.
5
Explanation:
Correct method names:
* addMouseListener
* removeMouseListenerIncorrect method names:
* addListener – missing listener’s name
* setMouseListener – there are no set methods for listeners (only add and remove)
* deleteMouseListener – there are no delete methods for listeners (only add and remove)
* registerMouseListener – there are no register methods for listeners (only add and remove)