Java News

Java Annotated Monthly – March 2024

This month’s Java Annotated Monthly is packed with the latest Java news ahead of Java 22’s release in March. It’s also full of Kotlin updates, tutorials for Spring and Hibernate, and more. If all that wasn’t enough, there’s also a podcast featuring AI-generated music! 

Simply put, it’s full of cool stuff for anyone interested in tech. Let’s get started! 

Java News

Java News Roundup 1, 2, 3, 4 – All of the latest Java news is here. 

Java RenaissanceGeorges Saab discusses the exciting developments brought by Java 21, highlighting a new wave of enthusiasm and prospects for the Java platform​​.

Simplifying Java Development: Introducing Multi-File Program Launching – The new Java feature introduced in JEP 458 allows Java developers to run applications composed of multiple source code files directly, without needing a full project setup or explicit compilation. Get all of the details in this article. 

JDK 22 G1/Parallel/Serial GC changesThomas Schatzl presents the latest enhancements in JDK 22’s garbage collection, focusing on performance and efficiency improvements in G1, GC, and Parallel GC.

Java 21 and Beyond: A Roadmap of InnovationsAna-Maria Mihalceanu discusses Java 21’s latest features, from String Templates to Generational ZGC. 

Virtual Thread’s Next Steps – In this talk, Alan Bateman presents the ongoing enhancements to Virtual Threads, focusing on improvements in Java monitors, I/O, and other key areas for future JDK releases. He also outlines the next steps for developing this feature.

Java Language Update – Early 2024 Edition – If you are searching for a comprehensive overview of the recent Java advancements and future developments, this article is for you. 

A Bootiful Podcast: Oracle Java Developer Advocate Nicolai Parlog on the latest and greatest in Java – In the podcast, Oracle Java Developer Advocate Nicolai Parlog discusses the latest developments and features in Java, providing insights and updates for the Java community. 

Java Tutorials and Tips

Foreign Function & Memory API – A (quick) peek under the hoodMaurizio Cimadamore introduces the Foreign Function & Memory API in JDK 22, offering a simpler and more efficient alternative to JNI for accessing native libraries from Java.

JVM Performance Comparison for JDK 21 – This article describes a series of Java Virtual Machine (JVM) benchmarks with a primary focus on top-tier Just-In-Time (JIT) compilers, such as C2 JIT, and Graal JIT. 

How to use Java Records with Spring Data JPA  – In this article, Vlad Mihalcea explains how to integrate Java Records with JPA entities using conversion methods for effective data management.

Foojay Podcast #43: Modern Java TestingOleg Šelajev, Roni Dover, Jonas Geiregat, and Frank Delporte discuss various testing-related topics including unit tests, test containers, flaky tests, and more.  

Pattern match Optional in Java 21Stephen Colebourne describes a trick to get pattern matching on Optional in Java 21. Find out which one from this article.

Java 22 Previews Statements Before super(…) and this(…) – Inside Java Newscast #62Nikolai Parlog shows how JEP 447 allows previewing statements before the explicit constructor invocation.

Java Enhances Pattern Matching with Primitive Type Support in JEP 455 – Find out how 

JEP 455 enhances Java’s pattern matching by supporting primitive types in instanceof and switch, making code more readable and reducing conversion errors​​.

Sorting Text in Java, How Complicated Can It Be? – Sorting text should be easy, as String implements the Comparable interface. In this article, Anthony Goubard demonstrates that it can be more complicated than that.

Automatic differentiation of Java code using Code Reflection – In this article, you will find out what automatic differentiation is, why it’s useful, and how we can use Code Reflection to help implement automatic differentiation of Java methods.

Builders, Withers, and Records: Java’s path to immutability – Immutable objects are easier to maintain, lead to fewer errors, and are multi-thread friendly. In this article, Jonathan Vila talks about two different approaches to creating objects in Java: builders and withers, typically used in the context of immutable objects, along with Java records.

Emulating C# LINQ in Java using Code Reflection – This article explores how to emulate C#’s Language Integrated Query (LINQ) in Java using Code Reflection.

Data Oriented Programming in Java 21, Solving the Countdown game – JEP Cafe #22 – In this JEP Café session, José Paumard demonstrates the latest JDK enhancements supporting Data-Oriented Programming, such as Records, Sealed Types, and Pattern Matching, and new Stream API features like mapMulti(). These tools are shown through the medium of the Countdown game.

Top Most Detected Issues in Java Projects – Check out a list of the ten most common issues detected in Java projects according to Jonathan Vila. Even seemingly minor issues can significantly affect software in terms of security, performance, and maintenance, so don’t ignore them. 

Does Java 22 Kill Build Tools? – Inside Java Newscast #63 – Java 22 brings multi-source-file execution to the platform. It allows us to run programs consisting of multiple source files and even dependencies with just a simple Java command. Will it be beneficial for seasoned developers and beginners? Find out in Nicolai Parlog’s Inside Java Newscast. 

Presentation: AWS Lambda Under the HoodMike Danilov covers how Lambda is built and how they had to modify the architecture to support 10GiB payloads.

JDK 22 G1/Parallel/Serial GC changesThomas Schatzl presents the improvements in G1, Parallel, and Serial garbage collectors, which enhance performance and reduce pause times. 

How to Embed Documents for Semantic Search – In this post, you’ll get a closer look at how to embed documents for use in a semantic search. Through the provided examples, you’ll discover how embedding impacts search results and how to enhance them.

Presentation: How Netflix Really Uses JavaPaul Bakker demonstrates how Netflix is using Java, emphasizing the use of microservices, RxJava, Hystrix, and Spring Cloud.

Java 21 features: A detailed look at the most important changes in the new LTS releaseArkadiusz Rosłoniec demonstrates the most exciting Java 21 features and tries to predict their significance.

Languages, Frameworks, Libraries, and Technologies

This Week in Spring 1, 2, 3, 4 – Catch up on all of the latest Spring updates from February.

A Bootiful Podcast: Gunnar Morling on the 1BRC challenge and taking Java to BLAZING fast performance territoryGunnar Morling and Josh Long discuss how the 1BRC challenge significantly improved Java’s performance metrics. 

The Billion Row Challenge (1BRC) – Step-by-step from 71s to 1.7sMarko Topolnik shares a detailed account of the Billion Row Challenge, showcasing how he dramatically improved data processing from 71 seconds to 1.7 seconds. That said, at 2.3 seconds, his official 1BRC result wasn’t quite as good. 

When should a compiler expand garbage collection barriers? – This article describes a case in a production compiler where Roberto Castañeda Lozano had to reduce the amount of program information fed to the compiler instead of taking the more traditional approach of exposing it. 

Writing Integration Tests for Spring Boot Web Applications: Build Setup – This blog post explains how to set up a Maven build for Spring Boot integration tests. By creating a customized build, you can easily control the project’s build process.

Spring Tips: Spring AI – Have a look at the new Spring AI project, which provides convenient integrations with LLMs and tools to support the RAG (retrieval-augmented generation) pipeline. 

An Efficient Way to Check for Existence of Multiple Values in SQLLukas Eder explores efficient SQL strategies for checking the existence of multiple values.

Spring Boot Docker Compose Support  – Check out this video by Simon Martinelli in which he demonstrates the newly added Docker Compose support in Spring Boot 3.1.

Video: Spring Boot Testcontainers Support for Local Development – You might enjoy another video by Simon Martinelli, showcasing how Testcontainers can be utilized both for testing your application and during development.

Podcast: Generally AI Episode 2: AI-Generated Speech and Music – In this podcast, Roland Meertens and Anthony Alford discuss AI-generated voices and music, including celebrity voices, ethical concerns about consent, and potential risks. As a bonus, they wrap up with a live demo of AI-generated music.

Hibernate StatelessSession JDBC Batching – This article explains how to utilize Hibernate StatelessSession to enable JDBC Batching for INSERT, UPDATE, and DELETE statements. Despite being available for over 20 years, until Hibernate 6, its capabilities were limited without support for batching and other features like UPSERT.

PostgreSQL Performance Tuning SettingsVlad Mihalcea explores various PostgreSQL performance tuning settings that you might want to configure since the default values are not suitable for a QA or production environment.

Last Updated Columns With Postgres – Gunnar Morling’s article explores a straightforward method for automatically updating ‘last updated’ columns in PostgreSQL. 

Kotlin Corner

Amper Update – February 2024 – Amper, an experimental project configuration tool by JetBrains, has released version 0.2.0, introducing exciting features like support for Gradle version catalogs and enhanced completion for adding new dependencies. 

Using Amper and Fleet in a Kotlin/Compose KMP projectJohn O’Reilly is trying out the recently released Amper v 0.2.0 in a Kotlin Multiplatform sample. 

Perils of duplicate findingJake Wharton discusses the challenges of identifying duplicate elements in an array of integers, and exploring different programming approaches to overcome them. 

Using SQLDelight in Kotlin Multiplatform (KMP) – Persistent data storage is crucial for many apps, and SQLDelight is a popular library for managing database interactions in Kotlin projects. In this blog post, you can read about the integration of SQLDelight into a Kotlin Multiplatform project, which enables you to efficiently manage your database interactions across various platforms (Android, iOS, and Desktop).

Kotlin Flows Animated – To a beginner developer, the concept of Flows can be quite confusing. What are they for? How do they make things easier for us? What do we do when we use collect() or emit(), and what are all those operator functions? In this article, Robert Baricevic-Petrus attempts to explain what Flows are in simple terms that everyone can understand. 

Type Classes in Kotlin: A Practical Guide – Explore the concept of type classes in Kotlin, a powerful tool that allows developers to abstract logic for different data types. 

Simply your Kotlin by Refactoring Actions to Calculations – In this episode, Duncan McGregor demonstrates a refactoring technique that allows you to separate actions and calculations in a bowling simulator. As a result of refactoring, he demonstrates an entire 10-pin bowling game as calculations on immutable game state data, making the code cleaner and more testable.

Conferences and Events

IntelliJ IDEA Conf 2024 – Do not miss IntelliJ IDEA Conf 2024, a developer-focused, live, online event that is free for all to attend!

Idiomatic Kotlin – Bern, Switzerland, March 4

Debugging With IntelliJ IDEA – Lucerne, Switzerland, March 5

The Secrets of Vector API – Zurich, Switzerland, March 6

Voxxed Days Zurich – Zurich, Switzerland, March 7

JVM Ergonomics, Clean Code, and OpenTelemetry – Amsterdam, the Netherlands, March 13

To Spring Boot 3 and Beyond! – Atlanta, USA, March 19

Voxxed Days Bucharest – Bucharest, Romania, March 27–29

Building Intelligent Applications With Spring AI – Online, March 28

Culture and Community

The State of OpenJDK – In his insightful talk, Dalibor Topić reviews four years of OpenJDK Community progress and anticipates future developments.

Harnessing the Power of ChatGPT 4.0 From Java – This article by Dr. Heinz Kabutz demonstrates how ChatGPT 4.0 effectively translated a historical book from a Cretan dialect to English, outperforming Google Translate by preserving the text’s poetic quality​​.

How to keep engineers out of meeting hell – For engineering managers, making meetings engaging for engineers is key. This article comes with some tips on how to do this.

And Finally…

The New Terminal (Beta) Is Now in JetBrains IDEs – We invite you to try out the new terminal (Beta) in JetBrains IDEs and read more about it in this blog post. 

Java Best Practices – Starting with Java? Check out our best practices guide, designed to assist beginners in creating clear, reusable, and efficient code.

‘HelloWorld’ and ‘main()’ meet minimalisticMala Gupta explains why JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview) is especially helpful to those starting to learn Java.

Constructor Makeover in Java 22 – How can you benefit from statements before super(…), a preview language feature in Java 22? Read about it in this blog post by MalaGupta to find out. 

Easy Hacks: How To Implement Polymorphism in Java – Polymorphism in programming means that a variable or a method can have different behaviors depending on the type of object it represents. In this article, Maarten Balliauw demystifies polymorphism in Java, showing how it helps you reduce coupling, increases reusability, and helps to make your code easier to read.

Build a Spring Boot App with AI Assistant – Check out this blog post to follow along with Marit van Dijk as she builds a compact Java Spring Boot application in IntelliJ IDEA with the help of JetBrains AI Assistant.


Qodana Code Analysis: From the IDE to Quality Gates – Discover how Qodana helps you enhance code quality and learn how to integrate it into your CI pipeline for quality checks and project health monitoring.

Reading Code Like a Pro | IntelliJ IDEA Tips – This video offers strategies to improve code-reading skills in IntelliJ IDEA, emphasizing features like syntax highlighting, inlay hints, and code formatting to help you navigate and understand code more easily. 

The State of IntelliJ Scala Plugin – This talk provides an overview of IntelliJ Scala Plugin’s features, especially those that we’ve worked on over the last few years, our road to Scala 3 support, and some of the latest developments in IntelliJ IDEA. 

That wraps up today’s edition!

We’re already gathering ideas for the next Java Annotated Monthly, so feel free to share your suggestions via email or tweet by March 20. Also, don’t forget to explore our archive of past JAM issues, which is perfect for catching up on any missed blog posts or articles.

image description