Companion code for the "From Java 8 to Java 25: The Modern Java Engineering Series"
A comprehensive multi-module project demonstrating every major feature from Java 8 to Java 25.
git clone https://github.com/techishthoughts-org/mordern-java-revision.git
cd mordern-java-revision
./gradlew build
./gradlew testRequirements: Java 21+ (download) | Gradle 8.x (wrapper included)
| # | Module | Topics | Tests |
|---|---|---|---|
| 01 | evolution-overview | Java 8 vs 25 comparisons, mindset shift | 29 |
| 02 | modern-syntax | Records, patterns, var, text blocks | 46 |
| 03 | data-oriented-programming | DOP vs OOP, sealed types | 37 |
| 04 | functional-patterns | Strategy, Decorator, Chain of Responsibility | 92 |
| 05 | performance-myths | JIT optimizations, benchmarks | 106 |
| 06 | gc-memory | ZGC, compact headers, object sizing | 94 |
| 07 | lombok-migration | Lombok to native Java migration | 89 |
| 08 | concurrency | Virtual Threads, Structured Concurrency | 21 |
| 09 | stream-gatherers | Custom intermediate operations | 39 |
| 10 | cloud-native | Containers, health probes, HTTP server | 65 |
| 11 | iot-edge | IoT sensors, edge computing patterns | 91 |
| 12 | ai-integration | LangChain4j, Vector API, RAG | 16 |
| 13 | migration-blueprint | Full migration case study | 89 |
Total: 814 tests
- Records - Immutable data carriers
- Sealed Classes - Closed type hierarchies
- Pattern Matching - Type-safe switch with deconstruction
- Text Blocks - Multi-line strings
- var - Local type inference
- Virtual Threads - Lightweight threads for I/O
- Structured Concurrency - Task lifecycle management
- Scoped Values - Safe context propagation
- Stream Gatherers - Custom stream operations
- Vector API - SIMD operations
- Generational ZGC - Sub-millisecond pauses
- Compact Headers - Reduced object overhead
| JEP | Feature | Version |
|---|---|---|
| 286 | var | 10 |
| 378 | Text Blocks | 15 |
| 395 | Records | 16 |
| 409 | Sealed Classes | 17 |
| 441 | Pattern Matching for switch | 21 |
| 444 | Virtual Threads | 21 |
| 473 | Stream Gatherers | 23+ |
| 480 | Structured Concurrency | 21+ |
| 506 | Scoped Values | 21+ |
| 519 | Compact Object Headers | 25 |
java-25-in-action/
├── build.gradle.kts
├── settings.gradle.kts
├── common/
├── 01-evolution-overview/
├── 02-modern-syntax/
├── ...
└── 13-migration-blueprint/
# Run specific module
./gradlew :08-concurrency:run
./gradlew :09-stream-gatherers:run
# Run with preview features (configured automatically)
./gradlew build- Fork the repository
- Create a feature branch
- Submit a pull request
MIT License - see LICENSE
Official
Books & Docs
- Data-Oriented Programming - Yehonathan Sharvit
- LangChain4j Documentation
TechishThoughts - Where the tech community connects and shares ideas.