Transforming Your Code to Java 8
summary
Shows concrete Java 8 rewrites: replace indexed Thread creation with lambdas and IntStream.range to remove mutable i and final hacks, find 100 primes with an infinite Stream.iterate plus filter map limit collect to List, list directory names via streams and Collectors.joining, sort with Comparator.comparing instead of mutating input, and replace finalize with try-with-resources and an execute‑around pattern using Consumer. Each refactor compiles and runs, cuts ceremony, and keeps behavior identical while improving clarity.
AI-written summary · about
chapters (7)
- 0:00Introduction to Java 8
- 3:30Refactoring imperative code
- 15:51Functional style examples
- 27:43File handling with streams
- 34:19Sorting with comparators
- 41:52Resource management patterns
- 53:57Conclusion and paradigm shift
related talks
01h 31mTransforming Code to Java 8
43mRefactoring to Functional Style
37mPragmatic Functional Refactoring with Java 8
44mI didn't know you could do that with Java Streams!
56mJava Functional Programming Idioms
01h 01mAPI Design with Java 8 Lambdas and Streams
45mBenefiting from Java 9 Improvements
01h 25mJava 8 Language Capabilities, What's in it for you?
