No Hate on Java 8, But 9–14 Reign Supreme
summary
Modernizes a Java 8 Selenium test using concrete Java 9–14 features: replace repetitive declarations with var (local type inference) and rules for use; replace loop + list population with Stream.map and collectors; use takeWhile/dropWhile (example list of 11 accounts yields 3 then 8) after sorting; use switch expressions to assign values without fall-through; show preview records (final fields, accessor names without get) and text blocks for embedded JSON, noting previews lack full library support so avoid in production yet.
AI-written summary · about
chapters (12)
- 0:00Intro
- 0:14Beyond Java 8
- 5:31Only works for local variables
- 5:49Not allowed in headers
- 10:58New line for each method call
- 13:54Sort for deterministic results
- 18:58Cannot mix and match - and yield
- 19:42Can throw Exceptions
- 23:20Records can be instantiated
- 23:38Records are immutable
- 24:04Accessors don't start with get
- 27:48Text cannot begin on same line as








