In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail what the new features of Java14 may bring, and the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
JDK/Java 13 was released a month ago, and it brings five new features, of which the Text Blocks (text block) feature seems to be the most discussed. The text block feature, like the common Python "" any input "" feature, supports multi-line string text, eliminates the need for most escape sequences, and allows developers to control formatting. Although this is not a particularly complex feature, it is a great convenience for developers to introduce HTML code into Java, and the readability of the code is greatly improved.
JDK 14 is now in the Early-Access (EA, early visit) phase, and the official version will be released on March 17 next year according to the release cycle.
The latest version is build 17 (https://jdk.java.net/14/). Update instructions for each build can be found at: https://jdk.java.net/13/release-notes.
This article quotes the report from InfoWorld (http://uee.me/cw5VE)) to introduce three new features that may appear in JDK 14. Two of these features have been officially proposed, and another feature is predictive. Take a look at:
Improve NullPointerExceptions to improve the availability of exceptions generated by JVM by describing exactly which variables are null. The authors of the proposal hope to provide developers and support staff with useful information about why the program terminates abnormally, and to improve understanding of the program by more clearly associating dynamic exceptions with static program code.
Byte buffering for nonvolatile mapping adds a new JDK-specific file mapping pattern that allows FileChannel API to be used to create MappedByteBuffer instances that reference nonvolatile memory (NVM). NVM enables developers to build and update program status across programs without the significant replication and translation costs that input and output operations typically incur, which is especially important for trading programs. The main goal of the enhancement proposal is to ensure that clients can access and update NVM; consistently and effectively from Java programs. The second goal is to use the restricted JDK internal API defined in the Unsafe class to implement this submission behavior, so it can be reused by classes other than MappedByteBuffer that may need to be submitted to NVM; another goal is to allow existing API to track buffers mapped on NVM for monitoring and management.
Switch Expressions is previewed in both JDK 12 and 13 and is expected to become a stable feature in JDK 14. Switch expressions extend switch statements so that they can be used not only as statements (statement) but also as expressions (expression), and both can be written using the traditional switch syntax, or using the simplified "case L->" pattern matching syntax to act on different ranges and control the execution flow. These changes will simplify day-to-day coding and prepare for pattern matching in switch (JEP 305, address: http://uee.me/cw5VJ).
Finally, it is important to note that the features of the EA phase may never appear in the final official GA version of JDK/Java 14.
So much for sharing about the new features that Java14 may bring. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.