Ten new features of JAVA10

<div id="article_content" class="article_content csdn-tracking-statistics tracking-click" data-mod="popu_519" data-dsm="post">
                            <div class="htmledit_views">
                        
    <div class="rich_media_content" id="js_content">
                    


                    


                    
                    
                    <p style="margin-bottom:15px;font-size:16px;white-space:pre-line;line-height:30px;color:rgb(74,74,74);font-family:Avenir, '- apple-system-font', 'Microsoft Yahei', sans-serif;"><img style="border:2px solid rgb(238,238,238);visibility:visible !important;" src="https://ss.csdn .net / p http: //mmbiz.qpic.cn/mmbiz_png/TNUwKhV0JpQ9s9ib46onssFcYlORu0DeoRd9OmFRxuU5J7nIj5HP0o3TSHampvKsTGL8SfpJTd9ua2cJzTLouLQ/640 wx_fmt = png & amp; wxfrom = 5 & amp; wx_lazy = 1 "alt =" 640 wx_fmt = png & amp; wxfrom = 5 & amp; wx_lazy = 1 "??? ></p><p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line;line-height:30px;color:rgb(74,74, 74);font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;">Java 9 has only been released for a few months, many things are not fully understood, and now Java 10 will be coming. . </p>< p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line;line-height:30px;color:rgb(74,74,74);font-family :Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;">At this time, I really want to say: JDK 7 or even JDK 6 and JDK 8 used online are not yet used. JDK 9 was released soon, I don't know what to do, JDK 10...</p><p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line;line -height:30px;color:rgb(74,74,74);font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;">Are the students who just learned Java? Feeling overwhelmed? ! ! ! </p><p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line;line-height:30px;color:rgb(74,74,74 );font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;">Even my old driver feels the same way! </p><p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line; p style="margin-top:15px;"><span style="color:rgb(74,74,74);font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans -serif;font-size:16px;white-space:pre-line;">Local variable type inference is arguably the most noteworthy feature in Java 10, which is adopted by Java language developers to simplify the writing of Java applications another step, as shown in the figure below. </span><br></p><p><br></p><p><img class="img_loading" src="https://ss.csdn.net/p?https:// mmbiz.qpic.cn/mmbiz_png/TNUwKhV0JpQ9s9ib46onssFcYlORu0DeoaibCM97HU6PJW9gIv4mevlIiaW50rS1IGOdKcmtrXHGjPeDVNr9j3Yfg/640?wx_fmgint=png" alt="640?wx_fmt=png"></p><p style="margin-top:1px;font5px; :16px;white-space:pre-line;line-height:30px;color:rgb(74,74,74);font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans -serif;"> This new feature will add some syntactic sugar to Java - simplifying it and improving the developer experience. The new syntax will reduce the verbosity associated with writing Java, while maintaining the promise of static type safety. </p><p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line;line-height:30px;color:rgb(74,74,74 );font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;">Local variable type inference will introduce the "var" keyword, that is, you can define variables at will without having to Specify the type of variable, such as:</p><pre style="margin-top:0px;margin-bottom:0px;padding:8px 0px 6px;background-color:rgb(0,0,0);color:rgb (80,97,109);font-size:10px;line-height:12px;"></pre><ol class="list-paddingleft-2" style="list-style-type:none;"><li ><p><span style="color:rgb(74,74,74);display:block;line-height:22px;font-size:14px !important;"><code style="margin-left:- 20px;line-height:12px;border-width:0px;font-size:10px;font-family:inherit ! /strong></p><p style="margin-top:15px;text-align:left;"><span style="color:rgb(74,74,74);font-family:Avenir, '- apple-system-font', 'Microsoft Yahei', sans-serif;font-size:16px;white-space:pre-line;">JDK 10 will introduce a new way to execute callbacks on threads, so this It would be convenient to be able to stop a single thread rather than stop all or none of them. </span></p><p style="margin-right:1em;margin-left:1em;"><strong>4. Heap Allocation on Alternate Memory Devices (JEP 316)</strong></p ><p><br></p><p><span style="color:rgb(74,74,74);font-family:Avenir, '-apple-system-font', 'Microsoft Yahei' , sans-serif;font-size:16px;white-space:pre-line;">Allows the HotSpot VM to allocate Java object heap memory on an alternate memory device, which will be specified by the user. </span></p><p style="margin-right:1em;margin-left:1em;"><strong>5. Other Unicode Languages ​​-  Markup Extensions (JEP 314)</strong></strong> p>< p><br></p><p style="white-space:normal;border-width:0px;border-style:none;margin-top:15px;"><span style="color:rgb(74 ,74,74);font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;font-size:16px;white-space:pre-line;"></span ><span style="color:rgb(74,74,74);font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;font-size:16px;white- space:pre-line;">The goal is to enhance java.util.Locale and its related APIs in order to implement additional Unicode extensions to the language markup syntax (BCP 47). </span></p><p style="margin-right:1em;margin-left:1em;"><strong>6. Java-based experimental JIT compiler</strong></p><p ><br></p><p style="white-space:normal;border-width:0px;border-style:none;margin-top:15px;"><span style="color:rgb(74, 74,74);font-family:Avenir, ' Like all other JDK releases, Oracle has released an initial Java 10 release candidate that Java developers can download to test new features. If you're looking forward to Java 10 and want to try it early, start now! </p><blockquote style="margin-top:1em;margin-bottom:1.2em;padding:15px 15px 15px;color:rgb(129,145,152);border-left-width:6px;border-left-color:rgb (220,230,240);font-size:14px;line-height:22px;background:rgb(242,247,251);font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;white- space:normal;"><p style="white-space:pre-line;line-height:30px;color:rgb(74,74,74);">Address for early adopters: http://openjdk.java.net /projects/jdk/10/</p></blockquote><h3 style="font-size:20px;white-space:normal;color:rgb(21,153,87);line-height:1.35;">< a name="t2"></a> </h3><p><span style="color:rgb(248,122,122);">Final thoughts</span></p>< p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line;line-height:30px;color:rgb(74,74,74);font-family :Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;">It is indeed a big leap for the first new feature, other features can bring more or less to the development the Gospel. But what will Java 10 look like in the end, and perhaps more useful new features or optimizations, we have to look forward to it! </p><p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line;line-height:30px;color:rgb(74,74,74 );font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;">What to do now is to get familiar with JDK 8, which is now standard for many Internet companies. If you are still using JDK4-7, it is really going to be OUT. . </p><p style="margin-top:15px;margin-bottom:15px;font-size:16px;white-space:pre-line;line-height:30px;color:rgb(74,74,74 );font-family:Avenir, '-apple-system-font', 'Microsoft Yahei', sans-serif;">In the near future, Java 10 will revolutionize the way you write code! </p><p style="min-height:
                  </div>
                    </div>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324734078&siteId=291194637