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

What is the difference between menuitem and checkboxmenu item?

784


Why do you canvas?

613


What is the Difference between Final Class && Abstract Class?

618


Can inner class be public in java?

553


What is the primary benefit of encapsulation?

562






Is there any tag in htm to upload and download files?

612


What is a method signature java?

576


Tell me the latest versions in java related areas?

585


Explain java code for recursive solution's base case?

575


can java object be locked down for exclusive use by a given thread? : Java thread

534


How do you sort data in java?

525


What is meant by main method?

581


Does java set allow duplicates?

529


Can one thread block the other thread?

608


What is update method called?

665