ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

How are Observer and Observable used?

The observer pattern in java is known for its use in design. Whenever an observable object changes its state, its corresponding observer classes are notified. Observable is implemented as a class which includes methods for managing Observer lists and notifying 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.  For example, third-party software cannot be made Observable without changing an existing class hierarchy.

 

Related Posts Plugin for WordPress, Blogger...
Flag Counter