Modern Java for Rust Engineers
For: Experienced Rust developer, proficient with ownership, traits, async/await, Cargo. Used Java 8 or earlier; unfamiliar with modern features (records, sealed classes, virtual threads, JPMS). Intermediate level — knows programming deeply but needs a mental model bridge from Rust to modern Java.
Learning Brief: Modern Java for Rust Engineers
Topic
Modern Java (17+) for experienced Rust engineers who used old Java (8 or earlier) and want a comprehensive update through a Rust-comparative lens.
Scope
In scope
- Java 17–21+ language features compared to Rust equivalents
- Type system differences (erasure vs monomorphization, variance, sealed types)
- Concurrency models (virtual threads vs async/tokio)
- Memory model (GC thinking vs ownership thinking)
- Error handling paradigms (exceptions vs Result)
- Functional programming idioms (streams vs iterators)
- Build tooling and project structure (Gradle/Maven vs Cargo)
- Interface-based polymorphism vs trait-based polymorphism
Out of scope
- Basic Java syntax (the learner knows old Java)
- Rust fundamentals (the learner is proficient)
- Spring/Jakarta EE frameworks (too broad, deserves its own plan)
- JVM internals beyond what's needed for the GC/memory discussion
- Android-specific Java
Success Criteria
After completing this plan, the learner should be able to:
- Read a modern Java 21 codebase and understand idiomatic patterns without constant reference lookups
- Identify which Rust pattern corresponds to which Java pattern (and vice versa)
- Write a small Java service using records, sealed classes, virtual threads, and streams
- Set up a Gradle project with proper module structure, dependencies, and tests
- Make informed decisions about error handling, concurrency, and memory in Java