smallbiztechnology_logo (1)

Java 23 introduces incremental preview capabilities

5 Min Read
Incremental Preview

The latest iteration of Java, Java 23, introduces incremental preview capabilities as the open-source programming language continues to modernize and improve. Java is among the most widely used enterprise programming languages but has sometimes been seen as less modern than rivals like Python and Rust. With today’s release, Oracle and its partners in the open-source Java community aim to make Java both easier to use and more powerful for enterprise applications.

Java 23 comes six months after its predecessor, maintaining the regular cadence of Java updates in recent years. Among the updates in Java 23 are language feature previews, libraries, including the Class-file API, and performance and runtime updates, such as making Z Garbage Collector (ZGC) generational mode the default. Andrew Cornwall, a Forrester analyst, noted, “Oracle is evolving Java into a modern programming language whose biggest challenge to getting new users may be that it’s still called Java.

For existing Java users, Java 23 offers signposts toward what will need to change in their code bases—not too much—and what’s coming but not there yet: AI and more support for parallelism.”

Cornwall noted that Java has been making significant changes in recent years while retaining backward compatibility, which he called an impressive engineering achievement. Java 23 introduces key enhancements that deliver significant business benefits, IDC analyst Arnal Dayaratna also observed. Dayaratna identified three key takeaways from Java 23: improved scalability and resource efficiency with virtual threads that reduce costs and improve high-performance application development, faster, more maintainable code with pattern matching for switch that accelerates feature delivery and reduces long-term technical debt, and seamless integration with native libraries via the Foreign Function & Memory API that boosts performance for data-intensive applications without requiring code rewrites.

See also  Tech Startups Thriving Amid Economic Uncertainty

James Labocki, senior director of product management at Red Hat, said Java 23 showcases continued progress toward simplifying Java development while enhancing performance. The release focuses on concurrent programming and streamlining the overall developer experience. Two key features expected to stand out are structured concurrency and scoped values.

Java 23 modernizes enterprise application development

“These features, now in their third preview, are designed to treat related tasks as a unified operation while providing ways to share immutable data efficiently within threads,” Labocki noted. “Both of these updates drive toward making Java more accessible and powerful for developers.”

Python is often considered to be an easier language to program in, especially for data science, than Java.

Rust has gained adoption in recent years as a way to help improve performance and security. Oracle sees Java as being able to compete against both, thanks to incremental changes in Java 23 that will be further developed in future versions. JEP 477, which defines an update for Implicit Classes and Instance Main Methods, will significantly simplify Java code.

Without JEP 477, a simple “Hello World” application takes more than double the lines of code compared to Python or JavaScript. “This is really good for perception because when you’re up against the narrative that Python or JavaScript are taking over and you can do all kinds of great things by just typing ‘print,’ so can Java as well,” Chad Arimura, vice president of Java developer relations at Oracle, said. One of the most significant additions to Java 23 is the introduction of generational mode as the default for the Z Garbage Collector.

See also  UK Experiences Lowest Inflation Rate in Two Years

Georges Saab, senior vice president of Java development at Oracle and chair of the OpenJDK Governing Board, explained that the original focus of ZGC was on applications with very large memory demands and extreme low-latency requirements. The generational capability now makes ZGC more usable in a wider range of use cases. Saab shared that he had one fairly large customer with a multiyear effort to rewrite a key application from Java to Rust.

The customer tried ZGC, and it just worked, leading them to abandon the effort to move to Rust. The Java version was doing everything needed and more.

Share This Article
Benjamin Lee is a tech guru with a flair for innovation and problem-solving. With years of experience in the industry, Benjamin has established himself as a go-to expert in all things tech-related.