Benefiting from Java 9 Improvements
summary
Java 9 deprecates finalize and adds private methods in interfaces to factor shared code, makes try-with-resources accept outside (effectively final) variables so injected resources work, and bans underscore as an identifier. Streams gain takeWhile and dropWhile and an overloaded iterate(seed,predicate,fn) for logical termination. Optional adds ifPresentOrElse, or and optional.stream(), Collectors get filtering/flatMapping helpers, and compact immutable factories appear as List.of/Set.of/Map.of.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:32Interfaces
- 5:06Finalize
- 6:47Lifes Lesson
- 7:32Close Method
- 9:35External Resource
- 11:55Zombie Object
- 12:26Underscore
- 14:32Using Underscore
- 25:01Instream Methods
- 32:19Optional
- 38:51Our Method
related talks
02h 39mJava 9 and Beyond
02h 34mExploring Java 9: The Key Parts
47mPolishing the Diamond: Core Library Improvements in Java 9
46mPolishing the Diamond: Core Library Improvements in Java 9
55mTransforming Your Code to Java 8
34mNo Hate on Java 8, But 9–14 Reign Supreme
01h 25mJava 8 Language Capabilities, What's in it for you?
52mCollections Refueled
