• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

listeners

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi everybody,
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
given answer is only b.
2)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].
the given answer is b and c.
in first question c and second question c is same.
why they given in 1 is wrong and 2 is correct.
actually what is the correct answers for this.
plese help me.
thank you
sri.
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sri,
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

A. False. The return type is "void" .
b. True.
c. False. (Correct me if I am wrong about this Answer c).
2)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].
a. False. "void" is the return type.
b. True
D. False(friends ?.... no way)
E. False. There is "no way" to determine the order of Events.
Can somebody help regarding the below statment
"A copy of the original event is passed into a listener method."

Aruna
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
c is false since a copy of the original event reference is passed.
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic