Abstract Factory Pattern
A creational pattern that produces families of related objects without specifying their concrete classes.
A creational pattern that produces families of related objects without specifying their concrete classes.
A structural pattern that allows incompatible interfaces to work together by wrapping one interface with a compatible one.
A creational pattern that separates the construction of a complex object from its representation, allowing the same construction process to produce different results.
A behavioral pattern that passes a request along a chain of handlers, each deciding to process it or pass it to the next handler.
A behavioral pattern that encapsulates a request as an object, enabling undo/redo, queuing, logging, and parameterization of operations.
A structural pattern that composes objects into tree structures to represent part-whole hierarchies, letting clients treat individual objects and compositions uniformly.
A structural pattern that dynamically adds behavior to an object by wrapping it in decorator objects, without altering the original class.
A structural pattern that provides a simplified interface to a complex subsystem, hiding its internal complexity from client code.
A creational pattern that defines an interface for creating an object but lets subclasses decide which class to instantiate.
Consolidated interview Q&A for GoF design patterns in Java — creational, structural, and behavioral — covering beginner through advanced topics.
A behavioral pattern where an object (subject) maintains a list of dependents (observers) and notifies them automatically when its state changes.
A creational pattern that creates new objects by copying (cloning) an existing instance rather than instantiating from scratch.
A structural pattern that provides a surrogate object which controls access to another object, adding security, caching, logging, or lazy initialization transparently.
A creational pattern that ensures a class has exactly one instance and provides a global access point to it.
A behavioral pattern that allows an object to change its behavior when its internal state changes, as if the object changed its class.
A behavioral pattern that defines a family of algorithms, encapsulates each one, and makes them interchangeable at runtime without changing the client.
A behavioral pattern that defines the skeleton of an algorithm in a base class, deferring specific steps to subclasses without changing the overall structure.