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 |
Iterator in the HashMap is fail-safe means what?
Describe what a thread-local variable is in java?
I have a String s = java; What is the output when I say s.replaceAll('j', 'k'); Also what is the value of s after replacing?
Write a program to print fibonacci series
List interface?
what is webservices?
Differentiate between overriding and overloading cases?
What is java reflection api?
How do you compare objects in java?
What do you mean by thread safe?
What are the two types of java programming?
Can an abstract class be a final class?