I\'m making a program in Java with the Observer pattern (with the help of the Java API). If some of the observables had more than one instance, the program could crash. Should I
Yes, the GoF lists the Singleton as a related pattern (along with the Mediator) to the Observer:
The ChangeManager may use the Singleton pattern to make it unique and globally accessible.
ChangeManager is their Observable in the sample code.
I have used a Singleton Observable (here) to update the GUI everytime relevant changes occur to the Persistence Unit. The program won't crash but it won't function as expected if there were more instances.