Skip to main content

Posts

Showing posts with the label jdk21

jdk 21: The new features in Java 21

JDK 21 is scheduled to be released in September 2023 as specified in    JSR 395 . The main 3 features included in JDK 21  are  a) Sequenced Collections According to  OpenJDK , a sequenced collection has first and last elements, and the elements between them have successors and predecessors. A sequenced collection supports common operations at either end, and it supports processing the elements from first to last and from last to first (i.e., forward and reverse). b)  Virtual Threads According to OpenJDK ,  Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. c)  String Templates (Preview)  According to OpenJDK ,  Enhance the Java programming language with  string templates . String templates complement Java's existing string literals and text blocks by coupling literal text with embedded expressions and  template processors  to produce specialized results