It is also referred to as the publish-subscribe pattern. The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods..
Observer Design Pattern The Gang of Four book (Design Patterns: Elements of Reusable Object-Oriented Software, 1995) says that the Observer design pattern should "Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically". We can not talk about Object Oriented Programming without considering the state of the objects. To have a good design means to decouple as much as possible and to reduce the dependencies. In the Observer Design Pattern, the subject notifies all observers by calling the update() operation of each observer. The Observer pattern provides a design where the Subject and Observer are loosely coupled. It specifies communication between objects: observable and observers. Let's assume we have a stock system which provides data for several types of client. In observer pattern, the object that watch on the state of another object are called Observer and the object that is being watched is called Subject. 1.1. 2. This article describes the Observer design pattern and its usage in the programming language Java. The Observer Design Pattern can be used whenever a subject has to be observed by one or more observers. Learn more about Observer Usage of the pattern in C# Observer Pattern is one of the behavioral design pattern. void notify() { for (observer: observers) { observer.update(this); } } But the problem here is each observer is updated in a sequence and update operation for an observer might not be called till all the observers before it is updated. After all object oriented programming is about objects and their interaction. Implementation of Observer Pattern in Java

An observable is an object which notifies observers about the changes in its state. The subject does not need to know about the ConcreteObserver class. Free source code and UML.
Observer is so pervasive that Java put it in its core library (java.util.Observer) and C# baked it right into the language (the event keyword).

The Observer pattern provides a way to subscribe and unsubscribe to and from these events for any object that implements a subscriber interface. The Other names of this pattern are Producer/Consumer, Publish/Subscribe. The pattern defines a provider (also known as a subject or an observable) and zero, one, or more observers. For example, a news agency can notify channels when it receives news.