Добавить новость
News in English


Новости сегодня

Новости от TheMoneytizer

Java 21 set to include sequenced collections, string templates

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.

To read this article in full, please click here

Читайте на сайте


Smi24.net — ежеминутные новости с ежедневным архивом. Только у нас — все главные новости дня без политической цензуры. Абсолютно все точки зрения, трезвая аналитика, цивилизованные споры и обсуждения без взаимных обвинений и оскорблений. Помните, что не у всех точка зрения совпадает с Вашей. Уважайте мнение других, даже если Вы отстаиваете свой взгляд и свою позицию. Мы не навязываем Вам своё видение, мы даём Вам срез событий дня без цензуры и без купюр. Новости, какие они есть —онлайн с поминутным архивом по всем городам и регионам России, Украины, Белоруссии и Абхазии. Smi24.net — живые новости в живом эфире! Быстрый поиск от Smi24.net — это не только возможность первым узнать, но и преимущество сообщить срочные новости мгновенно на любом языке мира и быть услышанным тут же. В любую минуту Вы можете добавить свою новость - здесь.




Новости от наших партнёров в Вашем городе

Ria.city
Музыкальные новости
Новости России
Экология в России и мире
Спорт в России и мире
Moscow.media










Топ новостей на этот час

Rss.plus