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 |
How we can make copy of a java object?
where do you place after you did code in java
What problems will occur when you don?t use layout managers?
How do you sort a string in alphabetical order in java?
What are memory tables?
what is type of statement in jdbc connection?
1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual words of the sentence. 4) Reverse string without using temp string.
how exactly garbage collection take place?
What is a java predicate?
What do you understand by the bean persistent property?
7) Suppose there is Student class like class student { int age; string name; } We want to store these objects in a HashMap. Do we need to override any methods in Student class? If any which ones and why? what if i just override equals or just hashcode? what will be the results in both the cases?
Explain when classnotfoundexception will be raised ?