Pattern Matching for primitives

Java 26 - part 10: JEP 530 - Pattern matching for primitives

Java Pattern Matching: The Missing Piece (JEP 530) We have reached the 10th and final JEP of the Java 26 series. If you’ve been following Java for the last few years, you know the language has been on a massive “glow-up” journey. It was Project Amber that brought us records, sealed classes, and pattern matching. And this last one has been the stars of the show. It started as a way to stop writing those annoying casts after an instanceof, and it’s grown into a powerful tool for data-driven code. ...

March 6, 2026
Vector API

Java 26 - part 9: JEP 529 - Vector API

Java’s Vector API: The Marathon Continues (JEP 529) The Vector API is a new addition to the Java standard library that allows you to perform vector operations on arrays in a single CPU cycle. If there were a Guinness World Record for the “Longest Incubating Feature in Java History,” the Vector API would be holding the trophy. With the arrival of JEP 529, the Vector API is entering its 11th round of incubation in JDK 26. ...

March 5, 2026
Lazy Constants

Java 26 - part 8: JEP 526 - Lazy Constants

Bye-Bye Boilerplate: Say Hello to Java’s New “Lazy Constants” If you’ve ever had to initialize a heavy object only when it’s actually needed, you know the drill. You probably reached for the “Double-Checked Locking” pattern (which is easy to mess up) or the “Initialization-on-demand Holder” idiom (which is verbose). JEP 526 (Lazy Constants), coming as a second preview in JDK 26, is here to retire those old hacks. It introduces a first-class way to handle deferred initialization that is thread-safe, easy to read, and—best of all—lightning fast. ...

March 1, 2026
Structured Concurrency

Java 26 - part 7: JEP 525 - Structured Concurrency

The “No More Thread Leaks” Update: Java’s Structured Concurrency (JEP 525) If you’ve ever written concurrent Java code using ExecutorService, you know it can feel like herding cats. If one task fails, the others just keep running in the background like zombies, eating up resources and making debugging a nightmare. Structured Concurrency is here to fix that. It treats a group of related tasks as a single unit of work. If the main task is cancelled or fails, all its sub-tasks are automatically shut down. No leaks, no orphans, no headaches. ...

February 26, 2026
PEM Encodings of Cryptographic Objects

Java 26 - part 6: JEP 524 - PEM Encodings of Cryptographic Objects

If you have ever had to read a private key or a certificate from a file in Java, you know the pain. You probably wrote a utility method that manually stripped out the —–BEGIN… header, removed newlines, and performed a Base64 decode, only to feed it into a KeyFactory. It felt like hacky string manipulation for something that should be standard. The Gist: This JEP, and its predecessor JEP 470 in Java 25, introduces a standardized, easy-to-use API for encoding and decoding PEM (Privacy-Enhanced Mail) files. Instead of using third-party libraries (like Bouncy Castle) or writing brittle string replacement code, you can now parse keys and certificates natively. ...

February 12, 2026
G1 GC Double Buffering Throughput Improvements

Java 26 - part 5: JEP-522 Turbocharging G1 with 'Double Buffering'

If you run Java in production, you are likely using the G1 (“Garbage First”) Garbage Collector (it’s the default, after all). In Java 26, G1 is getting a significant “free” performance boost—estimated at 5–15% better throughput—without you changing a single line of code. This is one of those JEPs that does its work silently in the background (literally), but it’s implications are so significant that it deserves a blog post. ...

February 2, 2026
HTTP/3 support in Java HttpClient

Java 26 - part 4: JEP 517 HTTP/3 is Finally Here (Natively)!

If you’ve been waiting for Java to catch up with the modern web, the wait is over. Java 26 updates the java.net.http.HttpClient (the one we’ve loved since JDK 11) to officially support HTTP/3. Here is an example of how to use the API 1 2 3 4 5 6 7 var client = HttpClient.newHttpClient(); var request = HttpRequest.newBuilder(URI.create("https://openjdk.org/")) .GET() .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); assert response.statusCode() == 200; String htmlText = response.body(); Why should you care? HTTP/3 isn’t just a version bump; it swaps out TCP for QUIC (built on UDP). This is a big deal for performance because it solves “head-of-line blocking”—where one lost packet holds up the entire line of data. It basically means faster handshakes and much more reliable connections, especially if your users are on flaky networks with high packet loss. ...

January 29, 2026
AOT object caching with any GC

Java 26 - part 3: JEP 516 Ahead-Of-Time Object caching with any GC

JEP 516: Having Your Cake (Fast Startup) and Eating It Too (Low Latency) I have become a greater fan of Project Leyden with every deliverable it produced. I admit, I was sceptical when Chief Language Architect Brian Goetz announced Project Leyden. It felt as if some answer was needed after the arrival of GraalVM and its native images, that had a blistering startup speed. But how could we ever increase the startup of the JVM? Turns out, there are quite of few possibilities. ...

January 20, 2026
Removal of the Applet API

Java 26 - part 2: JEP 504 Remove the Applet API

Goodbye, Applets! (For Real This Time) If you’ve been doing Java for a while, you probably remember the “good old days” of running Java in the browser. One day, I was visiting London, from Amsterdam, and I bought my first Java book. This was in de the days before you buy anything at Amazon. The book introduced me to applets for the first time. Must have been around the time of Java 1.2, so we’re talking about 1998. Fast forward to a few years later and I had a girlfriend who was studying in IT. One of her assigments was to create a functioning chess application, running in a browser via an applet. Did we have fun writing that applet. Or least, I had fun. Well, those days of Applet-Chess are over, JEP 504 in Java 26 is finally cleaning house by permanently removing the Applet API. ...

January 17, 2026
JEP 500 Final Means Final

Java 26 - part 1: JEP 500 Prepare Final Mean Final

When you have been writing Java for a while, you may have noticed that you are writing final a lot. You typically use it when defining class or instance variables. In those situations the compiler will ensure that you assigned a value to it before the class constructor completes. Or you could use it with parameters to indicate that the values of these parameters should not be tinkered with. It is Java’s version of defining a constant. Or at least, that is what we have been thinking. But in real life, a final variable can be changed. Take a look at the following example: ...

December 29, 2025