Pages

Showing posts with label Java 14. Show all posts
Showing posts with label Java 14. Show all posts

Sunday, May 17, 2020

Java 14 Features With Examples - New JDK 14 Tutorial

1. Introduction


In this tutorial, We'll be learning what are the new features in java 14 and example programs in each area. This may be asked in the interview to check whether you are seeing regular updates on java and its latest changes.

Below are the features are added to the new JDK 14.

  • Switch Expressions (Standard) – JEP 361
  • Pattern Matching for instanceof (Preview) – JEP 305
  • Helpful NullPointerExceptions – JEP 358
  • Records (Preview) – JEP 359
  • Text Blocks (Second Preview) – JEP 368
  • Packaging Tool (Incubator) – JEP 343
  • NUMA-Aware Memory Allocation for G1 – JEP 345
  • JFR Event Streaming – JEP 349
  • Non-Volatile Mapped Byte Buffers – JEP 352
  • ZGC on macOS – JEP 364
  • ZGC on Windows – JEP 365
  • Foreign-Memory Access API (Incubator) – JEP 370


Java 14 Features With Examples - New JDK 14 Tutorial

Tuesday, January 7, 2020

Java 14 @Serial Annotation

1. Introduction


In this tutorial, we will learn a new annotation @Serial introduced in Java 14. This annotation is similar to the @Override annotation, @Serial annotation is used in combination with the serial lint flag to perform compile-time checks for the serialization-related members of a class.


Already this feature is available in build 25.

Java 14 @Serial Annotation