Java Cup
Inside Java

News and views from members of the Java team at Oracle

(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 streams by type.

Show Notes

Additional Resources

The Inside Java Newscast is a monthly YouTube show - check out the YouTube playlist for all the episodes. Since 2026, we also publish it as a podcast. For more Java news, subscribe to our RSS feed and follow @Java on X.

Contact us.