What to expect in Java 18

Image Credit: Bamyx Technologies

Java 18 is expected to be released in seven months, but it is already taking shape, with two new requests so far: record and array patterns and character sets.

While there are no official features listed on the OpenJDK page for Java Development Kit (JDK) 18, the JEP (JDK Enhancement Proposal) index of Java technologies includes two enhancements suggested for Java 18:

  • A sneak peek at record patterns and array patterns, in which the Java language would be extended with record patterns to deconstruct record values and array patterns to deconstruct array values, respectively. Patterns such as record patterns, array patterns, and type patterns, which were introduced in JDK 16, can be nested to increase the expressiveness and utility of pattern matching. Extending pattern matching to express more sophisticated, composable data searches is one of the proposal’s goals, as is not changing the syntax or semantics of type patterns.
  • Specifying UTF-8 as the standard Java APIs’ default charset. The web’s standard charset is UTF-8, a variable-wide character encoding for electronic communication. Charset is a type of character encoding that can handle a wide range of characters. Charset is a type of character encoding that can encode any character seen on the internet. APIs that rely on the default charset will now act similarly across all implementations, operating systems, locales, and configurations as a result of this change. The proposal does not propose any new Java APIs or JDK-specific APIs. By making UTF-8 the default charset, there’s a chance that programs won’t work properly with data produced when the new default charset isn’t specified. This danger isn’t new. UTF-8, on the other hand, poses virtually little danger in many applications. MacOS, for instance, UTF-8 has been the default charset for a number of releases, exceptions only exist when configured to use the Posix C locale, the proposal states. UTF-8 is also used by several Linux distributions. In other situations, changing the default charset to UTF-8 after more than 20 years may provide a serious risk, affecting Windows users in Asian locations as well as maybe some server environments in Asia and other locales.

JDK 18 would be released in March 2022, according to the typical Java six-month release cycle. Pattern matching for switch expressions and statements, which is being previewed in the next JDK 17 release, as well as a vector API and a foreign function and memory API, both of which are in an incubator stage in JDK 17, are all prospective features for JDK 18.

JDK 17 will be available for production on September 14th.

Oops! You almost missed a step!!! you are yet to give us your LIKES Today.

BAMYX TECHNOLOGIES says thank you for your LIKES.

--

--

--

We are a technology business that provides large-scale saas solutions to companies in a variety of industries.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Update: Death Animations

Apache Block Unnecessary Request Methods

Learn How to Negotiate Your Salary with Expert Help

Learning how to program #1

🐧 BANK-HTB✅

Four issues Data Warehouse could solve!

How to install Wakatime in Doom Emacs

Growing a DSL with Clojure: Clojure Makes DSL Writing Straightforward

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bamyx Technologies

Bamyx Technologies

We are a technology business that provides large-scale saas solutions to companies in a variety of industries.

More from Medium

Which implementation of Singleton Pattern do I need?

What is API Design First Approach — [Draft]

Reflection API

Arrays in Java