20

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

you are viewing a single comment's thread
view the rest of the comments
[-] onlinepersona@programming.dev 2 points 5 months ago

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 6 points 5 months ago

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 1 points 5 months ago

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

this post was submitted on 17 Jun 2024
20 points (85.7% liked)

Programming

17314 readers
66 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS