Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Java in General and the fly likes Observer and Observable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Observer and Observable" Watch "Observer and Observable" New topic

Observer and Observable

Aaron Raja
Ranch Hand

Joined: Jun 07, 2007
Posts: 206
What are Observer and Observable?How they are used?

Thanks, AR
Pravin Jain
Ranch Hand

Joined: May 20, 2007
Posts: 60
Observer and Observable are a pair of interface and class
in the java.util package to implement a general purpose
Observer pattern. something similar to the event delegation model.
Observable is any Object on which Observers may be registered
and which notifies the registered Observers about the changes
taking place in the state of the Observable.
Observer is an interface which is used for implementing
the action to be taken when the update is taking place on the

The Zen of Java Programming.
I agree. Here's the link:
subject: Observer and Observable
It's not a secret anymore!