Repolode
iluwatar

iluwatar/java-design-patterns

A Java code collection implementing classic and modern software design patterns, with well-commented examples for each pattern.

Stars
94,802
Forks
27,346
Open issues
141
Last commit
13 days ago

What is it?

This repository implements a large set of software design patterns in Java, with each pattern placed in its own module containing example code. The examples are commented to explain how the pattern is applied, so they can be read as step-by-step tutorials.

The patterns are browsable by name, by tag such as Performance or Gang of Four, and by category such as Creational or Behavioral. The project also provides a website at java-design-patterns.com that presents the same material with descriptions and links to the source.

The project's stated premise is that designs should stay as simple as possible, and that patterns should be introduced only when practical extensibility requires them. Contributions and a separate e-book version of the material are also offered.

Key features

  • 01Covers classic Gang of Four patterns and other widely used patterns in Java.
  • 02Each pattern has its own module with runnable, commented example code.
  • 03Patterns can be searched by name, tag, or category.
  • 04Includes a companion website with descriptions and links to source code.

Use cases

  • Learning design patterns by reading working Java examples.
  • Looking up a reference implementation of a specific pattern before applying it in your own code.
  • Preparing for software design interviews or code reviews that cover pattern usage.

Things to know

  • The metadata license is NOASSERTION, though the README states MIT, so verify the license file before reuse.

Topics

FAQ

What is java-design-patterns?
A Java code collection implementing classic and modern software design patterns, with well-commented examples for each pattern. This repository implements a large set of software design patterns in Java, with each pattern placed in its own module containing example code. The examples are commented to explain how the pattern is applied, so they can be read as step-by-step tutorials.
Is java-design-patterns free to use? What license does it have?
java-design-patterns is open source under the Other license. Check the license terms before using it in commercial products.
Is java-design-patterns still maintained?
Actively maintained. The last commit to java-design-patterns was on Oct 8, 2026.
What can I use java-design-patterns for?
Learning design patterns by reading working Java examples. Looking up a reference implementation of a specific pattern before applying it in your own code. Preparing for software design interviews or code reviews that cover pattern usage.
Where can I get java-design-patterns?
The source code and installation instructions are on GitHub: https://github.com/iluwatar/java-design-patterns

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects