Observable is used to create subclasses that other parts of the program can observe . When an object of such subclass undergoes a change, observing classes are notified. The update( ) method is called when an observer is notified of a change.
Read moreWhat is the purpose of using an observer?
The responsibility of observers is to register (and unregister) themselves on a subject (to get notified of state changes) and to update their state (synchronize their state with the subject’s state) when they are notified.
Read more