Skip to content

Latest commit

 

History

History

java-15

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Java 15

To run each example use: java --enable-preview --source 15 <FileName.java>

JEPs

  • 339 - Edwards-Curve Digital Signature Algorithm (EdDSA)
  • 360 - Sealed Classes (Preview)
  • 371 - Hidden Classes
  • 372 - Remove the Nashorn JavaScript Engine
  • 373 - Reimplement the Legacy DatagramSocket API
  • 374 - Disable and Deprecate Biased Locking
  • 375 - Pattern Matching for instanceof (Second Preview)
  • 377 - ZGC: A Scalable Low-Latency Garbage Collector
  • 378 - Text Blocks
  • 379 - Shenandoah: A Low-Pause-Time Garbage Collector
  • 381 - Remove the Solaris and SPARC Ports
  • 383 - Foreign-Memory Access API (Second Incubator)
  • 384 - Records (Second Preview)
  • 385 - Deprecate RMI Activation for Removal

Features

  • Sealed Types
    • Restrict which types can extend/implement a type
    • Constraints:
      • The sealed class and its permitted subclasses must belong to the same module, and, if declared in an unnamed module, the same package.
      • Every permitted subclass must directly extend the sealed class.
      • Every permitted subclass must choose a modifier to describe how it continues the sealing initiated by its superclass:
        • final
        • sealed
        • non-sealed (back to a normal class open to extensibility)
  • Pattern Matching for instanceof (second preview - no changes)
  • Text Blocks (standard)
  • Records (second preview)
    • Integration with sealed types in interfaces
      • The combination of record and sealed types is referred as algebraic data types.

JVM

  • GC turned final:

Links