Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Listners

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic