<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cay Horstmann on JAVAPRO International</title><link>https://javapro-en.svenruppert.com/authors/cay-horstmann/</link><description>Recent content in Cay Horstmann on JAVAPRO International</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 24 Mar 2026 16:58:41 +0000</lastBuildDate><atom:link href="https://javapro-en.svenruppert.com/authors/cay-horstmann/index.xml" rel="self" type="application/rss+xml"/><item><title>Effective Pattern Matching 2026 Edition</title><link>https://javapro-en.svenruppert.com/effective-pattern-matching-2026-edition/</link><pubDate>Tue, 24 Mar 2026 16:58:41 +0000</pubDate><guid>https://javapro-en.svenruppert.com/effective-pattern-matching-2026-edition/</guid><description>&lt;p&gt;Since Java 14, the Java switch and instanceof statements have been enhanced, in multiple phases, to support pattern matching and a &amp;ldquo;data-oriented&amp;rdquo; programming style. In this article, I explore when this programming style is beneficial, and why. I describe the syntax of pattern matching, as it has evolved, and show how it will be further enhanced in upcoming versions of Java. I warn of corner cases of the switch syntax where modern usage clashes with legacy behavior. I conclude with a set of rules when to use pattern matching and &amp;ldquo;data orientation&amp;rdquo; now, how to prepare for future enhancements, and when to stay away.&lt;/p&gt;</description></item></channel></rss>