Exploring what's new in Java in 2020.
summary
Live-coding demos run in JShell on a JDK 16 EA build and show concrete syntax and behavior: switch expressions with yield and polyexpression typing, pattern matching for instanceof as a preview that binds variables with flow scoping, text blocks for multiline JSON/SQL, and records with canonical constructor validation and reflection support. The session also streams JFR events (RecordingStream sampling CPU every second) and demos Foreign Memory Access: MemorySegment.allocateNative(1000) plus VarHandle set/get returning 42, noting the API remains incubating.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:32Overview
- 2:42Switch Expressions
- 7:34Type Inference
- 10:57Better Matching for Instance
- 15:42Text Blocks
- 19:15Records
- 24:43Canonical constructor
- 30:13Sealed classes and interfaces
- 37:21Better matching switch expressions
- 38:50Sealing records
- 40:20Sealed classes
- 40:54Flight Recorder API
- 44:44Memory Access API
related talks
20mNew features of Java 12 in action (live coding)
01h 11mModern Java: This is not your father's Java anymore
02h 36mJava keeps throttling up!
52mKeynote: The Future of Java Is Now
56mEffective Java SE 16 APIs
38mJava 20: Reviewing the Enhancements in the Latest JDK Release
44mJava: Java 12, 13 & 14. What's new and noteworthy?
02h 34mJava Next - Live Stream
