In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what the new features of Java13 are, and it has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article.
New features of Java13
The official development goals of Java 13 include improved garbage collection, application class data sharing, and text blocks
The Java Development Kit (JDK) 13, the next version of the standard Java, is now available as a candidate, and all new features are locked. JDK 13 has proposed a feature that has never been added to the official list, that is, the jpackage tool for packaging self-containing Java applications, has not been promoted. JDK 13 no longer considers it.
The new Java has arrived! Learn about the Jakarta EE enterprise Java roadmap. | the new Java version is here! You need to learn about any new features of Java JDK 11 and Java EE 8. | use InfoWorld's App Dev Report briefing to learn about hot topics in programming.]
JDK 13 expires on September 17th, 2019. The second candidate version expires on August 22nd. The following are the official features of JDK 13:
Add a block of text during the preview phase. A text block is a multiline string text that avoids the need for most escape sequences. Text blocks automatically format strings in a predictable manner and let developers control the format. This project references some of the goals behind adding text blocks to Java. One goal is to simplify the writing of Java programs by simplifying the expression of strings across several lines of source code while avoiding escape sequences in common cases. The second goal is to enhance the readability of strings in the program that represent code written in a non-Java language. The third goal is to support migration from string literals, stipulating that any new construct can represent the same set of strings as string literals, interpret the same escape sequence, and operate like string literals.
Original string
Is a feature of JDK 13, but it abandons text blocks and takes a different approach to representing strings without escaping line breaks and quotation marks. The original strings are concerned with the originality of the strings, but the Java project team now believes that the focus is wrong, because although the original strings can span multiple lines of source code, they involve the expensive need to support non-escape delimiters. JDK 13 planned to use the original string, but never officially added it to the list of recommended features.
Reimplementing the legacy socket API involves replacing the current net.Socket and java.net.ServerSocket API underlying implementations with simpler, more modern implementations. The goal of this new implementation is to make it easier to adapt to user-mode threads (also known as fibers), which are being studied in Project Loom. The previously mentioned legacy API can be traced back to JDK 1.0 and consists of legacy C and Java code that is described as cumbersome to debug and maintain. There are other problems with legacy implementations: native data structures that support asynchronous closures, resulting in reliability and migration problems, and concurrency issues that need to be thoroughly checked.
The second switch expression preview has been proposed for JDK 13. There used to be a statement like this in JDK 12, but now you need to make a change: to generate a value from a switch expression, you will delete the break jump out of the current value statement to support the yield statement. The goal is to extend switch so that it can be used as both statements and expressions, so both forms can use the traditional case...: tag and the new case... Instead of using fall through, the-> tag uses a new statement to generate a value from the switch expression. These changes simplify coding and prepare for pattern matching.
Enhanced ZGC (Z garbage collector) to return unused memory to the operating system, which is a recommendation integrated into JDK 13. ZGC is billed as a scalable, low-latency collector that currently does not return unused memory to the operating system, even if it has not been used for a long time. This behavior is not optimal for some applications and environments, especially those that need to consider memory footprint, such as containers or environments, where applications may be idle for a long time and are sharing or competing for resources with other applications.
Extend Application Class data sharing (AppCDS) to support dynamic archiving of classes at the end of application execution. The archive class will include all loaded application and library classes that do not exist in the default underlying CD archive. This recommendation is in the target phase to improve the availability of AppCDS and to eliminate the need for users to trial run when creating a class list for each application.
Thank you for reading this article carefully. I hope the article "what are the new features of Java13" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.