Key Points

#1. We need to know design patterns to find solutions for frequently occurring problems. And we want to reuse these solutions whenever we face a similar situation in the future.

#2. These are one kind of template to address solutions in many different situations.

#3. In other words, these are the descriptions of how different objects and their respective classes solve a design problem in a specific context.

#4. Here we have discussed 23 design patterns as outlined by the Gang of Four. These patterns can be classified into three major categories:

  1. Creational Patterns:

    These patterns mainly deal with the instantiation process. Here we make the systems independent from how their objects are created, collected, or represented. The following ...

Get Java Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.