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 variable length arguments in java?

499


What is a ternary operator in java? What is an interface?

537


What is tcp and udp?

585


What is a locale?

681


Can you access non static variable in static context?

545






What are the two main uses of volatile in Java?

589


What is array sorting in java?

534


How we can generate random numbers in java?

596


what is meant by encapsulation?

614


What is the loop in java?

559


What is bytecode verifier?

489


Explain inner classes ?

635


if u open login & logout ,how can udisplay the timelogin & logout members ?

1741


How many types of voids are there?

520


What is difference between an object and a class?

594