What do you think of the answer to this question about listener?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Woo_Hwang
Posted On:   Thursday, August 9, 2001 09:10 AM

I found this question from one of my favorite SCJP website. It has an answer, though, I doubt it, so I put this quetions again. Which statements about listeners are true? a. At most one listener can be added to any single component. b. If multiple listeners are added to a single component, the order of invocation of the listener is not specified. c. The return value from a listener is used to control the invocation of other listeners d. In the java package, listener methods generally take an argument which is an instance of the some subclass of java.awt.AWTEvent class They said the answer were b,d. Yes, I agree to b, but I'm not sure of d. Can somebody giv   More>>

I found this question from one of my favorite SCJP website. It has an answer, though, I doubt it, so I put this quetions again.


Which statements about listeners are true?


a. At most one listener can be added to any single component.


b. If multiple listeners are added to a single component, the order of invocation of the listener is not specified.


c. The return value from a listener is used to control the invocation of other listeners


d. In the java package, listener methods generally take an argument which is an instance of the some subclass of java.awt.AWTEvent class



They said the answer were b,d. Yes, I agree to b, but I'm not sure of d. Can somebody give me an answer for this?

   <<Less

Re: What do you think of the answer to this question about listener?

Posted By:   Luigi_Viggiano  
Posted On:   Thursday, August 9, 2001 09:38 AM

b: ok we agree.

d: Check Listeners:


ActionListener


AdjustmentListener


AWTEventListener


ComponentListener


ContainerListener


FocusListener


HierarchyBoundsListener


HierarchyListener


InputMethodListener


ItemListener


KeyListener


MouseListener


MouseMotionListener


TextListener


WindowListener


Everyone of them takes an AWTEvent instance or a subclass of AWTEvent, so d is correct.

Wich is your favorite certification web site?

About | Sitemap | Contact