Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Stay on top of Java news from 8 to 21

Thiago
November 04, 2023

Stay on top of Java news from 8 to 21

Do you know what's new in Java? Java has astounding news. Come with me to stay up-to-date with the latest Java news.

Thiago

November 04, 2023
Tweet

More Decks by Thiago

Other Decks in Technology

Transcript

  1. Table of contents Increase Development Productivity Performance and Garbage Collector

    How to stay up to date with the news Frameworks and Future 01 02 03 04
  2. The goal of Project Amber is to explore and incubate

    smaller, productivity-oriented Java language feature. Project Amber • Pattern Matching for Switch • Pattern Matching for Instanceof • Unnamed Classes and Instance main methods • Local-Variable Type Inference (var) • Records • Sealed Classes • String Templates • Text Blocks • Switch Expressions • Unnamed Patterns and Variables
  3. How many GC exists? A. 2 B. 3 C. 4

    D. 5 E. > 5 F. Do we have more than one?
  4. How many GC exists? A. 2 B. 3 C. 4

    D. 5 E. > 5 F. Do we have more than one?
  5. Parallel GC • Is the default until Java 9 •

    Is more focused on throughput
  6. CMS • Was replaced by G1GC • It was removed

    by JEP 363 - Remove the Concurrent Mark Sweep (CMS) Garbage Collector, after Java 14
  7. G1 • Is the default since Java 9 by JEP

    248: Make G1 the Default Garbage Collector • More focus on the balance between throughput and latency • G1 continues to be improved, JEP 423: Region fix for G1, which may be available on Java 22 • JDK-8272773 - Configurable Card Table Card Size (-XX:GCCardSizeInBytes) available on java 18
  8. Epsilon • No-Op GC • No latency because there is

    no GC execution. However, there is constant memory consumption; • JEP 318: Epsilon: A No-Op Garbage Collector (Experimental), available on Java 11 as Experimental
  9. Shenandoah • Lower latency GC • JEP 379: Shenandoah: A

    Low-Pause-Time Garbage Collector (Production), available on Java 15 for production
  10. ZGC • Lower latency GC • JEP 377: ZGC: A

    Scalable Low-Latency Garbage Collector (Production), available on Java 15 for production • Improving in ZGC on Java 21 - JEP 439: Generational ZGC
  11. Java 22 • JEP 454: Foreign Function & Memory API

    ✔ • JEP 423: Region Pinning for G1 ❓ • JEP 447: Statements before super() (Preview) ❓ • JEP 456: Unnamed Variables and Patterns ❓ • JEP 461: Stream Gatherers (Preview) ❓
  12. Java ?? • JEP 460: Vector API (Seventh Incubator) •

    JEP 455: Primitive types in Patterns, instanceof, and switch (Preview) • JEP 459: String Templates (Second Preview) • JEP 404: Generational Shenandoah (Experimental) • JEP 401: Value Classes and Objects (Preview) ….
  13. How to stay up to date? Not all improvements are

    done by JEP, so you can follow the release notes from Oracle https://www.oracle.com/java/technologies/javase/21-relnote- issues.html
  14. How to stay up to date? Follow by blog, where

    I’m posting about best practices, and also news from Java 😁 https://devjava.substack.com/