A fair share of my posts demonstrate how to use Java language features, how to get the most out of APIs, how to implement a pattern in modern Java, and so forth. For most of them I created dedicated demo projects and here's a list of them.
So if you're the kind of person who prefers to learn from code rather than blog posts or videos, why not check them out and play with the code yourself?
▚Java X Demo
A project showcasing all important Java 9-16 features
Here's a list of the posts that reference it:
▚Modern Java in Action
A GitHub Crawler with everything Java (21) has to offer
Here's a list of the posts that reference it:
▚Loom Lab
Experiments with Project Loom's virtual threads and structured concurrency
Here's a list of the posts that reference it:
▚Module System Woes
Common problems that pop up in modularized projects and their solutions or workarounds
Here's a list of the posts that reference it:
▚J_MS Monitor
An example project making full use of the Java module system and all its features
Here's a list of the posts that reference it:
▚Java After Eight
A real-life code base, initially on Java 8, that invites an update to Java 15 and to the many new language features, additional and improved APIs, and JVM capabilities
Here's a list of the posts that reference it:
▚Effective Java
A code base with examples, tests, and benchmarks for my YouTube series on Effective Java, Third Edition
Here's a list of the posts that reference it:
▚Java 9/11 Migration
A Java 8 code base that causes some migration challenges when updated to Java 9/11
Here's a list of the posts that reference it:
▚JUnit 5 Demo
A demo showing off all essential and many advanced JUnit 5 features
Here's a list of the posts that reference it:
▚Maven Java 9+
Different ways to build projects on Java 9 and later with Maven
Here's a list of the posts that reference it:
▚JSR 305 on Java 9+
An exploration into various ways of getting JSR 305 to work on Java 9
Here's a list of the posts that reference it:
▚Jigsaw vs Reflection
An experiment with Project Jigsaw's encapsulation and reflection
Here's a list of the posts that reference it:
▚JUnit Lambda Lab
An experiment with the JUnit Lambda prototype
Here's a list of the posts that reference it:
▚Benchmark Lab
A collection of various JMH-based Java benchmarks
Here's a list of the posts that reference it:
▚Pirate-Elvis Operator
A small project containing the Pirate-Elvis operation and some example uses
Here's a list of the posts that reference it:
▚Javadoc 8 Tags
A demo showing @apiNote
, @implSpec,
and @implNote
in action, including the necessary additions to Maven's pom.xml and the generated javadoc
Here's a list of the posts that reference it:
▚Instances of Non-Capturing Lambdas
An exploration into the JVM's reuse of non-capturing lambda expression instances
Here's a list of the posts that reference it:
▚Serialize Optional
A demo showing how to use the serialization proxy pattern to serialize Optional instances
Here's a list of the posts that reference it:
▚Serialization Proxy Pattern
A demo of the serialization proxy pattern
Here's a list of the posts that reference it:
▚Decorator Pattern With Java 8
A demo of how to better use the decorator pattern with Java 8 features
Here's a list of the posts that reference it: