in Design Patterns by
What is observer design pattern in Java?

► Click here to show 1 Answer

0 votes
Observer design pattern is one of the behavioral design patterns which defines one-to-many dependencies between objects & is useful when we are interested in a state of an object and we want to get notified when there is any change in state of Object. In Observer design pattern, when one object changes its state, all its dependent objects are automatically notified, the object is called Subject and dependants are called Observers. Java provides libraries to implement Observer design pattern using java.util.Observable class & java.util.Observer interface.
Learn More with Madanswer

Related questions