A list of major Java and JVM features since JDK 17 to 22 (digma.ai)
from LadyLeeLoosh@programming.dev to programming@programming.dev on 17 Jun 2024 11:08
https://programming.dev/post/15638499

A list of major Java and JVM features since JDK 17 to 22,

New language features JEP-409: Sealed Classes (17) JEP-440: Record patterns (21) JEP-441: Pattern matching for switch (21) JEP 456: Unnamed Variables & Patterns (22)

API changes JEP-306: Restore Always-Strict Floating-Point Semantics(17) JEP-382: New macOS Rendering Pipeline(17) JEP-400: UTF-8 by Default (18) JDK-8301226 – Clamp method for java.lang.(Strict)Math (21) JEP-439: Generational ZGC JEP-444: Virtual threads (21) JEP-454: Foreign Function & Memory(FFM) API (22)

Security JEP-452: Key Encapsulation Mechanism API (21) JDK-8275252: keystore file Features JEP-408: Simple web server (18) JEP-423: Region pinning for G1 (22) JEP-458: multi-file source-code programs (22) JEP-423: Region pinning for G1 (22) JEP-458: multi-file source-code programs (22)

Documentation JEP-413: Javadoc code snippets (18)

Deprecations

Lookahead Scoped values + Structured concurrency Module import declarations

#programming

threaded - newest

onlinepersona@programming.dev on 17 Jun 2024 14:23 next collapse

JEP-400: UTF-8 by Default (18)

Wow, I always thought Java had been UTF-8 by default since v6 or something.

JEP-441: Pattern matching for switch (21)

Python got it too!

JEP-440: Record patterns (21)

Is this the easy replacement of “beans”?

JEP-409: Sealed Classes (17)

Huh? Haven’t classes had final forever?

Anti Commercial-AI license

Kport@feddit.de on 17 Jun 2024 14:57 collapse

final prevents a class from being extended completely, while a sealed class is only extensible by a select few subclasses, which are explicitly defined in a permits clause in the sealed superclass

Traister101@lemmy.today on 17 Jun 2024 21:19 collapse

Permits is only required when the compiler can’t see the extending classes. IE inner classes can extend without needing to be written out in a permits clause. This isn’t really that useful but I’ve taken advantage of it more than once so who knows

JackbyDev@programming.dev on 20 Jun 2024 18:22 collapse

There seems like there is a copy and paste error where JEP-458 begins and then goes back to the content of JEP-408. (In case OP is the author/editor.)

LadyLeeLoosh@programming.dev on 06 Aug 2024 09:22 collapse

Thanks - will fix:)