This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Observer and Observable  RSS feed

 
Aaron Raja
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are Observer and Observable?How they are used?
 
Pravin Jain
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Observable.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!