Report this item to Etsy

Design Patterns in Java Cheat Sheet | 23 GoF Patterns, Runnable Code, Interview Questions (Digital Download)

Price:$19.00

Loading
Includes Etsy Purchase Protection

You can only make an offer when buying a single item

Highlights

  • Digital download
  • Digital file type(s): 1 PDF, 1 ZIP

All 23 Gang of Four design patterns in Java, each as ONE short Java 21 file that compiles and runs, with a JUnit test that passes. Plus a one-page when-to-use cheat sheet and 69 interview questions with short answers.

WHY THIS KIT
• All 23 GoF patterns, one file each: 22 to 56 lines (median 32). Modern Java 21: records, sealed interfaces, switch pattern matching and lambdas instead of getter boilerplate.
• It runs: 34 JUnit 5 tests in 23 test classes pass with mvn test on Java 21 and on Java 25 (same output on both). No Maven? run-all.sh / run-all.cmd compile with javac and run all 23 examples.
• Plain explanations: for every pattern the problem, the idea and when NOT to use it, plus the "before" code smell it replaces and the real output of the file.
• Interview ready: 69 questions (3 per pattern) with short answers, and where the JDK itself uses each pattern (Comparator, InputStreamReader, Integer.valueOf, java.lang.reflect.Proxy...).

WHAT IS INSIDE (one ZIP)
• Maven project: src/main/java (23 examples: creational 5, structural 7, behavioral 11), src/test/java (23 JUnit 5 test classes, 34 tests), pom.xml, run-all.sh, run-all.cmd, README
• Design-Patterns-Java-Kit.pdf, 30 pages: when-to-use chart (page 2), one page per pattern with code and output, drill sheet with questions only, answers, JDK table
• drills.csv: the 69 questions and answers for Anki or any flashcard app
• ai-rules: a Claude Code skill and a Cursor rule that spot where a pattern fits in your own Java code

HOW TO USE
1. Unzip and open the folder in IntelliJ IDEA, Eclipse or VS Code as a Maven project.
2. Run mvn test, or ./run-all.sh (Windows: run-all.cmd). Any single file also runs with: java src/main/java/dp/behavioral/StateExample.java
3. Print page 2 (the chart) and keep the drill sheet for interview practice.

GOOD TO KNOW
• Instant download, nothing is shipped.
• Needs Java 21 or newer (free JDK). Maven is optional.
• Code and explanations are in English. The examples use made-up shop data (prices in cents, demo tax rates, a fixed demo exchange rate).
• Copy the code into your own projects freely. Please do not resell the kit.

Instant Download

Your files will be available to download once payment is confirmed.  Here's how.

Instant download items don’t accept returns, exchanges or cancellations. Please contact the seller about any problems with your order.

Etsy Purchase Protection
Shop confidently on Etsy knowing if something goes wrong with an order, we've got your back for all eligible purchases — see program terms

You may also like

Shoppers with similar taste loved these

Show more
Show more
Listed on Oct 31, 2026