my dog learned polymorphism
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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!