This repository contains examples of commonly used design patterns implemented in Java.
The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance.
The Factory pattern provides an interface for creating objects but allows subclasses to alter the type of objects that will be created at runtime.
The Abstract Factory pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.
The Adapter pattern allows incompatible interfaces to work together. It converts the interface of a class into another interface clients expect.
The Strategy pattern defines a family of algorithms, encapsulates each one of them, and makes them interchangeable. It allows changing the algorithm at runtime.
The Builder pattern separates the construction of a complex object from its representation, allowing the same construction process to create different representations.
Each pattern is implemented in a separate package with corresponding Java files showcasing its usage and implementation.
Feel free to explore each pattern for detailed explanations and examples.