Polishing the Diamond: Core Library Improvements in Java 9
summary
Live-coded demos use the JShell REPL to show concrete Java 9 improvements that simplify real code: collection factory methods produce truly immutable lists and sets and Map.of overloads up to 10 (with Map.entry varargs for more pairs), Stream.ofNullable plus takeWhile/dropWhile and the iterate overload stop infinite streams by value, new collectors filtering and flatMapping preserve grouping semantics, and Optional gains stream(), ifPresentOrElse and or to compose lookups. Sample code runs on iteratrlearning / GitHub and examples execute as shown.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:41Expressions
- 2:00Table of Contents
- 2:49The Biggest Problem
- 4:15ArrayList
- 6:14Collections Factory
- 8:29MapFactory
- 18:11Limit Statement
- 22:09Collectors
- 27:33Tags
- 31:06Optionals
- 36:41IfPresent
- 40:19Optional API
related talks
47mPolishing the Diamond: Core Library Improvements in Java 9
45mBenefiting from Java 9 Improvements
02h 39mJava 9 and Beyond
52mCollections Refueled
02h 34mExploring Java 9: The Key Parts
55mTransforming Your Code to Java 8
50mThe Good, the Bad and the Ugly of Java API Design
34mNo Hate on Java 8, But 9–14 Reign Supreme
