Java 12 and Java 12 New Features

Java 12 is launch on March 2019.

  1. Java 12 add support for Unicode 11 –Means 684 new character added, 11 new blocks, 7 new script and 66 emoji character
  2. Allocation of Old Generation of Java Heap on Alternate Memory Devices
  3. Switch Expressions –
  •  HotSpot Windows OS Detection Correctly Identifies Windows Server 2019- error fixed now previously java detect Windows server 2016 only
  • New Java Flight Recorder (JFR) Security Events – this is discble by default but it can be enable by  JFR Option “ jdk.SecurityPropertyModification”

Records Security.setProperty(String key, String value) method calls

                      Records TLS handshake activity. The event fields include:

  1. Peer hostname
    1. Peer port
    1. TLS protocol version negotiated
    1. TLS cipher suite negotiated
    1. Certificate id of peer client
  • Compact number formatting –


 import java.text.NumberFormat;

import java.util.Locale;

public class Test {

       public static void main(String[] args) {

             NumberFormat fmt = NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT);

             String result = fmt.format(1000);




OUTPUT is : 1K

7. JEP 325 Switch Expressions – Both the statement and expression form can use either traditional case ... : labels  orsimplified case ... -> labels (no fall through

Leave a Reply

Your email address will not be published. Required fields are marked *