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

How do you check whether the list is empty or not in java?

520


How can we access some class in another class in java?

557


What are methods?

566


Is it safe to install java on my computer?

554


Can you explain the final method modifier?

579






List primitive java types?

608


What is a null check?

549


What do you mean by byte code?

525


What do you understand by private, protected and public?

531


Which of the following classes will have more memory allocated?

589


Discuss 2D arrays.

614


what is the difference between preemptive scheduling and time slicing? : Java thread

541


When should I use stringbuffer?

584


What is the full name of java?

578


What is linkedlist in java?

512