wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Listners Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Listners" Watch "Listners" New topic
Author

Listners

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Which statements are true about listeners?
A. The return value from a listener is of boolean type.
B. Most components allow multiple listeners to be added.
C. A copy of the original event is passed into a listener method.
D. If multiple listeners are added to a single component, they all must all be friends to each other.
E. If the multiple listeners are added to a single component, the order [in which listeners are called is guaranteed].
Ans B,C
But I think C is not correct. Pls help.
kishore kota
Greenhorn

Joined: Sep 23, 2000
Posts: 5
hi,
as u said if said c is not correct u r contradicting the fist ans,
which says multiple listeners can be added to a component,if the
original copy is sent(i.e call by value)it can be received by only one listener ,so c is correct
fedback pls,
with regards ,
krishna
Ying Xing
Greenhorn

Joined: Sep 23, 2000
Posts: 24
Hi Joe Casad:
Which statements are true about listeners?
A.The return value from a listener is of boolean type. //FALSE, the return type is void
B.Most components allow multiple listeners to be added. // TRUE
C.A copy of the original event is passed into a listener method. // FALSE, a copy of reference is passed
D.If multiple listeners are added to a single component, they all must all be friends to each other. // FALSE
E. If the multiple listeners are added to a single component, the order [in which listeners are called is guaranteed]. // FALSE, the order is NOT guaranteed
Ans B only
regards,
YingXing
 
Don't get me started about those stupid light bulbs.
 
subject: Listners