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 do you understand by the bean persistent property?
What are MalformedURLException and UnknownHost Exceptions and whey they will be thrown?
What are the differences between unchecked exception, checked exception, and errors?
What JNDI(Java Naming and Directory Interface) provides?
What is the diff. b/w Interfaces & Abstract class?
What is the main advantage of passing argument by reference?
How to compare strings in java?
where the static methods will live ,on stack ? can you explain brefly
What is the epoch date?
Convert a BST into a DLL and DLL to BST in place.
Can we declare Pointer in Java?
What is the primary benefit of encapsulation?