Design Pattern: Observer Pattern

Observer pattern deals with state change between related objects. When one object depends on any state of another object, then when the state changes the dependent object needs to be notified. Observer pattern enables the dependent objects to subscribe to the state change of the subject object.

Design Pattern: Observer Pattern in Java

Observer pattern is used to automatically notify state change in object to all its dependent objects. It works as a pub/sub for state change between objects. This article demonstrates Observer pattern implementations in Java.