Java Streams: Beyond The Basics
summary
Covers practical JDK 8+ techniques: lambda type inference, avoiding eager work by using a logger supplier instead of building messages, and preferring stream operations over shared mutable state (don’t use LongAdder inside forEach; use mapToInt(...).sum()). Shows naive recursive and sort-based approaches for “longest line” replaced by reduce/max for longest line, explains files.lines memory‑map parallelism in JDK 9, Optional.stream, flatMapping collectors, and takeWhile/dropWhile caveats.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:48My background
- 2:30Recap
- 4:05Type Inference
- 6:31Functional Interface
- 11:06Stream Sources
- 13:18Delayed Execution
- 13:33Uncertainty Principle
- 15:03Suppliers
- 17:09Avoiding Loops
- 19:05Example
- 25:44Peek
- 26:39Side effects
- 27:27Exercise
- 34:37Streams Approach
- 36:50Reduce Method
- 38:06Max Method
- 38:45JDK 9 Updates
- 41:18Network Interface Updates
- 41:48Files Dot Lines
- 43:26Stream Take While
- 44:58Drop While
related talks
01h 07mJava SE: Lambdas, Streams & Future Directions
47mThe Dark Side of Java 8 - Lessons Learned
46mStreams in JDK 8: The Good, the Bad, and the Ugly
50m10+ new features you ought to know using Java 8
44mI didn't know you could do that with Java Streams!
56mJava Functional Programming Idioms
51mIf Streams Are So Great, Let’s Use Them Everywhere... Right??
57mStay Ahead with Java’s Latest Features in JDK 23
