Java Design Patterns

What is a Design Pattern?

A design pattern is a reusable solution to a commonly occurring problem within a given context in software design. It’s not a finished design that can be transformed directly into source or machine code. Instead, it’s a description or template for solving a problem that can be employed in numerous situations.

Categories

Design patterns are primarily categorized into three types: Creational, Structural, and Behavioral.

Creational Patterns: These patterns deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

Structural Patterns: These patterns concern class and object composition. They offer different ways to create a structure among objects.

Behavioral Patterns: These are about communication patterns among objects, how they interact, and distribute responsibility.

1. Creational Patterns

2. Structural Patterns

3. Behavioral Patterns