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 if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
Is java type safe?
What is difference between static variable and global variable?
I have a Arraylist object, it has duplecate values also. Now question is i want delete duplecate data in that objet with out using Set?
What is lossy conversion in java?
can we add two numbers without using arthematic operators? if possible how?
Is void a keyword in java?
Can we declare static variables in JSP page.
Is it possible to compare various strings with the help of == operator? What are the risks involved?
What are the disadvantages of using inner classes?
Java Compiler is stored in JDK, JRE or JVM?
What is deserialization and how do we do deserialization?