How are Observer and Observable used?
Answers were Sorted based on User's Feedback
Answer / nimisha
Objects that subclass the Observable class maintain a list
of observers. When an Observable object is updated it
invokes the update() method of each of its observers to
notify the observers that it has changed state. The
Observer interface is implemented by objects that observe
Observable objects.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / guest
Objects that subclass the Observable class maintain a list
of observers. When an Observable object is updated it
invokes the update() method of each of its observers to
notify the observers that it has changed state. The
Observer interface is implemented by objects that observe
Observable objects.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / supriya
Subclass of Observable class maintain a list of observers.
Whenever an Observable object is updated, it invokes the
update() method of each of its observers to notify the
observers that it has a changed state.
An observer is any object that implements the interface
Observer.
| Is This Answer Correct ? | 2 Yes | 1 No |
What is the use of :: in java?
What is the difference between class & structure?
What is the difference between the ">>" and " >>>" operators in java?
How do you create immutable object in java?
What is the significance of continue jump statement? Explain with an example.
What are the escape sequences in java?
hi to all. well can you please tell me that why String class is immutable? Thanks in advance.
What is output buffer?
What are non-access modifiers?
What are the common problems you have faced while implementing Java?
what is the difference between yielding and sleeping? : Java thread
What are the two ways of implementing multi-threading in java?