The java.util.Observable interface implements the Observer pattern, which can be co-related here. However, all similarities end here. If we look at the Observable interface, we have the following methods:
public class Observable { void addObserver (Observer o); void deleteObserver (Observer o); void deleteObservers(); void notifyObservers(); void notifyObserver(int arg); int countObservers(); boolean hasChanged();}
Let's look at the Observer interface before we determine the differences:
public interface Observer{ void update(Observable o, Object arg)}
If we look at the Observable and Observer interfaces, we can see that they are all about a single event and its state. The Observable API has the responsibility of ...