How are Observer and Observable used?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java a compiler?

745


What are the main uses of this keyword?

802


What does java se mean?

765


How many threads can java run?

798


Why we override equals() method?

767


What is a file pointer?

701


What is constructor chaining and how is it achieved in java?

774


Why do we use bufferedreader?

725


Is 0 an irrational number?

808


How to change the priority of thread or how to set priority of thread?

764


What is static keyword?

776


What is the latest java version?

792


Is java a security risk?

788


What is a functional interface?

739


How do you override a private method in java?

682