(Dirty?) Tricks in Java 22 - Inside Java Newscast #64

Описание к видео (Dirty?) Tricks in Java 22 - Inside Java Newscast #64

Java 22 has many language features that Java 8 could only dream of - let's see what (dirty) tricks we can play with them: We'll see how to pattern-match `Optional`, how to expand a sealed type hierarchy, why nested switches may (?) be good for documentation, and how a reverse `instanceof` check is both elegant and questionable. We'll also go into text block line endings and filtering streamy by type.

~~~ Links ~~~

Java 17 to 20 Pattern Matching Full tutorial with Records, Instanceof and Switch:    • Java 17 to 20 Pattern Matching Full t...  
How can you use flatMap to filter a stream?    • How can you use flatMap to filter a s...  
Where to use Optional:    • Where to use Optional - Inside Java N...  
Text Blocks:    • Text Blocks - JEP Café #5  

~~~ Chapters ~~~

0:00 Intro
1:13 Expandable Sealed Types
3:00 Nesting Switches
5:22 Reverse Instanceof
6:36 Filter A Stream By Type
7:38 JDK 22 Launch Stream
https://dev.java/community/java-22-la...
8:11 Switching Over Optional
9:53 Text Block Line Endings
12:04 Good or Dirty?
12:58 Outro

Tags: #Java, #Java22, #OpenJDK

Комментарии

Информация по комментариям в разработке