CTO News Hubb
Advertisement
  • Home
  • CTO News
  • IT
  • Technology
  • Tech Topics
    • AI
    • QC
    • Robotics
    • Blockchain
  • Contact
No Result
View All Result
  • Home
  • CTO News
  • IT
  • Technology
  • Tech Topics
    • AI
    • QC
    • Robotics
    • Blockchain
  • Contact
No Result
View All Result
CTO News Hubb
No Result
View All Result
Home IT

Java 21 set to include sequenced collections, string templates

March 3, 2023
in IT


Java Development Kit (JDK) 21, due in September as the next long-term support release of Oracle’s standard Java implementation, is beginning to take form, with sequenced collections and string templates slated for the release so far.

Although the JDK 21 release page still lists no features as of March 3, 2023, two Java Enhancement Proposals covering these two features already have been designated for JDK 21. The specific proposals include:

  • Sequenced collections introduces interfaces to represent collections with a defined encounter order. Each collection has well-defined first and second elements and so forth, to the last element. Uniform APIs are provided for accepting first and last elements and processing elements in reverse order. Motivating the proposal is a situation in which Java’s collections framework lacks a collection type to represent a sequence of elements with a defined encounter order. It also lacks a uniform set of operations that apply across these collections. These gaps have been a problem and a source of complaints. The proposal calls for defining interfaces for sequencing for collections, sets, and maps, and retrofitting this into the existing collections type hierarchy. All of these new methods have default implementations.
  • String templates, to appear as a preview feature, complement Java’s existing string literals and text blocks by coupling literal text with embedded expressions and processors to produce specialized results. This API is intended to simplify writing of Java programs by making it easy to express strings that include values computed at runtime. It promises to enhance readability of expressions, improve program security, retain flexibility, and simplify the use of APIs that accept strings written in non-Java languages. Enabling development of non-string expressions derived from combining literal text and embedded expressions also is a goal.

As a long-term support (LTS) release, JDK 21 would get five years of Premier support and extended support until September 2031. The current LTS release is JDK 17, published in September 2021. Non-LTS releases, such as the JDK 20 release due March 21, and the current JDK 19 release, receive only six months of Premier support and no extended support.

New versions of Oracle’s standard Java implementation arrive every six months. Other possible features for JDK 21 include all the incubating and preview features in JDK 20, such as scoped values, record patterns, and virtual threads. Universal generics and the asynchronous stack trace VM API could also be included.

Copyright © 2023 IDG Communications, Inc.



Source link

Previous Post

Looking at the Dole Cyberattack and the Future of Critical Infrastructure Cybersecurity

Next Post

One Medical Joins Amazon to Make It Easier for People to Get and Stay Healthier

Next Post

One Medical Joins Amazon to Make It Easier for People to Get and Stay Healthier

How to Build a dApp on Polygon?

Trending News

Are your hiring practices restricting the attraction of female tech talent?

March 8, 2023

Who Will Blockchain Put out of Business?

December 26, 2022

The Hard Truth About Performance — A Guide for CTOs

December 31, 2022

© 2022 CTO News Hubb All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy and Terms & Conditions.

Navigate Site

  • Home
  • CTO News
  • IT
  • Technology
  • AI
  • QC
  • Robotics
  • Blockchain
  • Contact

Newsletter Sign Up

No Result
View All Result
  • Home
  • CTO News
  • IT
  • Technology
  • Tech Topics
    • AI
    • QC
    • Robotics
    • Blockchain
  • Contact

© 2021 JNews – Premium WordPress news & magazine theme by Jegtheme.

SUBSCRIBE TO OUR WEEKLY NEWSLETTERS