Java

How to Speed Up Your Vector Operations Using the Java 19 Vector API

This API provides classes to express vector computations that, given suitable hardware and runtime ability, are accelerated using vector hardware instructions. When run on a supporting platform, operations can be executed in parallel by the hardware. This style of parallelism is called Single Instruction Multiple Data (SIMD) parallelism. By using the API for vector computations, […]

How to Speed Up Your Vector Operations Using the Java 19 Vector API Read More »

Making Use of Java 19’s Enhancements for Switch Statements and Expressions

Pattern Matching for switch was proposed as a preview feature by JEP 406 and delivered in JDK 17, and proposed for a second preview by JEP 420 and delivered in JDK 18. This JEP proposes a third preview with further refinements based upon continued experience and feedback. For those who are not familiar with this

Making Use of Java 19’s Enhancements for Switch Statements and Expressions Read More »

How Java 19’s Foreign Function and Memory API Simplifies Calling Native APIs

The Foreign Function and Memory API (FFM API) is designed to allow developers to access data and code outside of the Java Runtime. The API allows accessing native libraries and native data without having to use JNI. The main goals of this API are: Simplicity: To replace the Java Native Interface (JNI) with a more

How Java 19’s Foreign Function and Memory API Simplifies Calling Native APIs Read More »

Writing Less Boilerplate Code in Java 19 With Instanceof and Record Classes Thanks to Record Patterns

In JDK 16, the instanceof operator was extended to accept a type pattern and perform pattern matching. Thanks to this, the instanceof-and-cast idiom could be simplified. Instead of writing developers can write If the pattern matches, the pattern variable s is initialized to the value of o cast to String. s can then be used

Writing Less Boilerplate Code in Java 19 With Instanceof and Record Classes Thanks to Record Patterns Read More »

How Structured Concurrency in Java 19 Helps to Make Programming of Concurrent Applications Easier

The goal of this extension is to simplify the maintainability, reliability, and monitoring of concurrent code. For this purpose, new abstractions like “Unit of Work” have been introduced, which can manage multiple threads under one hat. This allows, for example, to implement error handling at the level of a “Unit of Work” instead of separately

How Structured Concurrency in Java 19 Helps to Make Programming of Concurrent Applications Easier Read More »

Blog Post Series: 6 New Features in Java 19 That Make Your Life Easier

Java 19 has been available since September 20, 2022 and I didn’t want to miss the opportunity to write some blog posts about some cool new features. Most of them have been made available either as a preview feature or incubator module. This means that these features have to be explicitly activated during the compilation

Blog Post Series: 6 New Features in Java 19 That Make Your Life Easier Read More »