Observer Pattern using Java’s Observable
The Observer Design Pattern enables the subject to notify its observers when its state changes. In this post, we implement it using Java’s Observable class.
The Observer Design Pattern enables the subject to notify its observers when its state changes. In this post, we implement it using Java’s Observable class.
The Observer Design Pattern defines a one-to-many dependency between objects so that when the subject’s changes state, all of its observers are notified.