Nirali Nirali is a Java Developer at IDR Solutions and also enjoys being part of the business development team. She is currently studying for her MSc Computing at De Montfort University.

What’s new in Java13?

1 min read

The new Java version is just around this corner of the year.

JDK 13 is due September 17, 2019. An initial release candidate is due on August 8. Java13 has the following features slated for release.

Dynamic CDS Archives:

Allow to extend application class-data sharing to allow the dynamic archiving of classes at the end of Java application execution. The archived classes will include all loaded application classes and library classes that are not present in the default, base-layer CDS archive. Due to this, users will no longer need to do trial runs to create a class list for each application.

Uncommit Unused Memory:

Enhance ZGC to return unused heap memory to the operating system. It does not currently uncommit and return memory to the operating system, even when that memory has been unused for a long time. This behavior is not optimal for all types of applications and environments, especially those where memory footprint is a concern. Some examples are Container environments where resources are paid by use, Environments where an application might be idle for long periods of time and, is sharing or competing for resources with many other applications.

Reimplement the Legacy Socket API:

Replace the underlying implementation used by the java.net.Socket and java.net.ServerSocket APIs with a simpler and more modern implementation that is easy to maintain and debug. The new implementation will be easy to adapt to work with user-mode threads, a.k.a. fibers.

Switch Expressions:

The switch expressions feature is being re-previewed after the initial preview in JDK 12. The syntax has been changed following community feedback, and now introduces a new keyword, yield, to handle returning values from a switch expression used in block form. Extend switch so it can be used as either a statement or an expression, and so that both forms can use either traditional case ... : labels (with fall through) or new case ... -> labels (with no fall through), with a further new statement for yielding value from switch expression. These changes will simplify everyday coding, and prepare the way for the use of pattern matching  in switch. This is a preview language feature in JDK 13.

Text Blocks:

Text Blocks aims to add text blocks to the Java language which were previously called multi-line strings. This feature aims to reduce some of the burden of including large quantities of formatted text directly in Java programs. This is a preview language feature in JDK 13.

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

Nirali Nirali is a Java Developer at IDR Solutions and also enjoys being part of the business development team. She is currently studying for her MSc Computing at De Montfort University.

Leave a Reply

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

IDRsolutions Ltd 2019. All rights reserved.