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 jvm? How its run?
How to create packages in java?
What happens if we override only equals?
why is S capital in System.out.println ????
What is == and === in javascript?
whats the life cycle of jsp
Can a class extend more than one class?
What is the difference between static and non-static variables in java programming?
Explain the difference between extends thread vs implements runnable in java?
Mention some interfaces implemented by linked list in java.
How are multiple inheritances done in Java?
What is the difference between == and === javascript?