The Visitor Pattern – ‘Revisited’ using Data Oriented Programming techniques
Java Language improvements culminating in java 21 obviate the need for the verbose visitor pattern as we know it, instead elevating it into a first class language feature.
-
Java 23 Has Arrived, And It Brings a Truckload of Changes
Table of Contents From Project AmberJEP 455: Primitive Types in Patterns, instanceof, and switch (Preview)JEP 476: Module Import Declarations (Preview)JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview)JEP 482: Flexible Constructor Bodies (Second Preview)What Happened to String Templates?From …
-
Java 22 Is Here, And It’s Ready To Rock
Java 22 is here, and it’s ready to rock! Boasting a set of 12 JEPs, it finalizes features like ‘unnamed variables and patterns’ and previews new ones like ‘statements before super(…)’ and ‘stream gatherers’ .
-
Java 21 is Available Today, And It’s Quite the Update
Today’s the first day of Java 21’s availability! It’s been six months since Java 20 was released, so it’s time for another fresh wave of Java features.
-
Exploring Java Records In A Jakarta EE Context
This article explores the adoption of Java Records in a Jakarta EE application as a data transfer and projection object.
-
It’s Java 20 Release Day! Here’s What’s New
In this article, we will take you on a tour through all JEPs that come with this release and give you a brief introduction of each one of them.
-
How to Best Use Java Records as DTOs in Spring Boot 3
Explore how to best use compact Java Records as Data Transfer Objects (DTOs) for database and API calls in Spring Boot 3 with Hibernate 6 as the persistence provider.
-
Foojay Podcast #5: OpenJDK 19 Discussion Panel
It’s September 20th, OpenJDK 19 has been released. In this podcast, we discuss the new features and the changes that this release brings.
-
What Can We Expect In OpenJDK 19?
Although the Java 19 release is coming in September (2022-09-20), we already know what will happen in that release!
-
Avoid Multithreading Bugs Using Immutable Java 16 Records
In a multi-threaded Java application, any thread can change the state of an object.
The Java memory model in Java language specification specifies when exactly updates made by one thread are going to be visible to other threads.
This is one of the biggest problems professional Java developers deal with every day.
Java records are immutable. An object is considered immutable if its state cannot change after it is constructed. The immutable nature of records eliminates problems of its usage in a multithreaded environment.