• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Listeners question

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can somebody explain to me the answer:
What is true of the listeners?

A. the return type is boolean
B. most components allow multiple listeners to be added.
C. a copy of the original event is passed into a listener method
I said B, and C, the mock exam said B only. I thought all listeners had methods which had a handle on an "event" object. Can somebody explain to me what my confusion is?
 
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Wilson
I think about twenty miniutes and find out a possible solution.
C. a copy of the original event is passed into a listener method
The answer does not say something before you need to do.
It may be tricky or I misunderstand it
Original event/event source should be registered first,than it can be passed into a listener method.
It may be a suitable answer
 
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, b only, event is not passed into listener.
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sometimes they asked you
What is the modifiers for event listener ?
should be public for ALL
 
reply
    Bookmark Topic Watch Topic
  • New Topic