Tag Archives: Design Pattern

Observer design pattern in Java

The Observer design pattern is a Behavioral design pattern that defines a one-to-many dependency between objects so that when one object changes state, all its dependent objects (observers) are notified and updated automatically. This pattern is also known as the Publish-Subscribe pattern. Observer design pattern real world example Let’s understand the observer design pattern with… Read More »

Abstract factory design pattern in Java

The Abstract Factory design pattern in Java is a creational pattern that provides an interface (Abstract Factory) to create families of related objects without specifying their concrete classes. Concrete factory classes implement the interface to create specific object families. This pattern allows the client code to create objects without knowing their exact implementations, promoting flexibility… Read More »