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

Veröffentlicht am: 28 Februar 2024
auf dem Kanal: Java
16,776
788

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


Auf dieser Seite können Sie das Online-Video (Dirty?) Tricks in Java 22 - Inside Java Newscast #64 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Java 28 Februar 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 16,776 Mal angesehen und es wurde von 788 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!