Latest Java Best Practices
summary
Opinionated checklist of which new Java features pay off: functional Java (streams, lambdas, method references) solves the demo task of finding the 10 longest words from a 235,000-word Webster list and prints five 24‑char words; collection factory methods like List.of/Set.of/Map.ofEntries give unmodifiable literals (nulls and duplicates throw); Local Variable Type Inference (var) helps messy generics; Optional semantics reduce protocol ambiguity; new HTTP client, JShell, enhanced switch expressions (Java 14), records (preview) and the enablePreview flag for Java 14 are shown in a Gradle repo with JUnit 5 and Google JSON and the examples run.
AI-written summary · about
chapters (13)
- 0:00Introduction and caveats
- 3:43Java 14 preview features setup
- 8:42Functional Java features worth learning
- 25:19Default methods in interfaces
- 29:15Optional data type explained
- 35:22Java Time API replacement
- 38:54Collection factory methods
- 43:12Local variable type inference
- 46:21HTTP client and JShell
- 51:17Enhanced switch statements
- 55:30Records and pattern matching
- 57:38Controversial module system
- 59:02Summary and contact info
related talks
32mGetting the Most from Modern Java
01h 00mUpgrade to Modern Java
50m10+ new features you ought to know using Java 8
38mModern Java: Beyond Version 8
55mA Few New Cool Features in Modern Java
49mJava 8: the good, the bad and the ugly
57mStay Ahead with Java’s Latest Features in JDK 23
38mJava 8: Functional programming
