How are Observer and Observable used?

Answers were Sorted based on User's Feedback



How are Observer and Observable used?..

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

How are Observer and Observable used?..

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

How are Observer and Observable used?..

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

Post New Answer

More Core Java Interview Questions

Will minecraft java be discontinued?

0 Answers  


Why is a constant variable important?

0 Answers  


What is the difference between stringbuffer and stringbuilder class?

0 Answers  


Why java does not supports multiple inheritance?

3 Answers   TCS, VSoft,


What are the types of java languages?

0 Answers  






Can main() method in java can return any data?

0 Answers  


Java Compiler is stored in JDK, JRE or JVM?

0 Answers  


What is jvm? Why is java called the platform independent programming language?

0 Answers  


What is meant by tab pans?

0 Answers  


What are the different ways of implementing thread? Which one is more advantageous?

0 Answers  


What is the syntax and characteristics of a lambda expression?

0 Answers  


What is the common usage of serialization? What exceptions occur during serialization?

0 Answers  


Categories