What are the examples of Observer design pattern in JDK?

In JDK there are many places where Observer design pattern is used. Some of these are as follows:

  • java.util.Observer, java.util.Observable
  • javax.servlet.http.HttpSessionAttributeListener
  • javax.servlet.http.HttpSessionBindingListener
  • All implementations of java.util.EventListener, and also in Swing packages
  • javax.faces.event.PhaseListener
Read the full book at www.amazon.com
Posted in Design Pattern, Design Pattern Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *