Java 8 has been launched. Let's take a look at its charm. Let's take a look at the major changes he made. I. Java 8 overview Java 8 was officially launched by Oracle (Oracle) in March 27, 2014. Java 8 also launched three language systems: Java SE8, Java SE Emebbled 8, and Java ME8. Compared with the previous system enhancements of Java SE8, Java SE8 provides enhanced support for the set-type operating language lambda expressions. Lambda expressions are an anonymous function, lambda expressions are named after the lambda Algorithm in mathematics and directly correspond to the lambda abstraction action. They are an anonymous function, that is, a function without a function name. Lambda expressions can represent closures (note that they are different from traditional mathematics ). Note that Lambda expressions are widely used in C #, c ++, and other languages. Therefore, Java SE8 includes them. ② Enhance some new time operation APIs, so that you are no longer so worried about Java time operations. All in all, it is the Instant, LocalDate, LocalTime and LocalDateTime classes, so that you do not need to specify the so-called time zone for the operation time, the system automatically determines, so that our programmers work much easier. ③ Java SE8 introduces a brand new Nashorn js parsing engine. This new interpreter will replace the existing Java Rhino interpreter. It is said that it executes JavaScript very quickly, just like the world's fastest sports car V8s. ④ Java SE8 saves a lot of configuration work, so the ssh architecture is no longer cumbersome. ⑤ Enhance the dynamic judgment of some exceptions in the code before compilation. For example, Mom no longer has to worry about exceptions in my NULL pointer issue. ⑥ Remove the Jvm process impact and greatly increase the performance. Java Emblemed SE8 and Java SE8 have the same APIs. The difference is that they can use a smaller architecture to build corresponding applications. Java SE8 focuses more on developing embedded devices, such as the development of set-top boxes. 2. download JDK 8. in Google, enter Java 8 download Oracle, open the corresponding connection, and open the Oracle download page. Here I Am Going To download windows x64 bits. In this case, it's okay. Install JDK 8. Download JDK 8 and click Next.: 4. When using JDK in eclipse, pay attention to the versions of eclipse 4.4 and later. Versions earlier than eclipse4.4 do not support Java se8. So we need to download eclipse4.4 or later versions. We will not repeat them too much here. 5. lambda overview first, we briefly understand the definition of lambda expressions. Lambda expressions are named after the lambda Algorithm in mathematics and directly correspond to the lambda abstraction action. They are an anonymous function, that is, a function without a function name. Lambda expressions solve some stubborn problems in the Java language: Java cannot be like a functional language, implementing function nesting. Although anonymous internal classes can call the current thread, they cannot be called across threads. Anonymous internal classes also bring about a disadvantage, that is, this is nothing different from the current object. Java cannot call external non-static non-final objects. This kind of functional interface is summarized as: functional interface (functional interface is also called functional interface, but it is actually the same thing ). To put it simply, a functional interface contains only one method. For example, Java. lang. Runnable and java. util. Comparator in the java standard library are typical functional interfaces. Java 8 provides @ FunctionalInterface as annotation. This annotation is optional. As long as the interface complies with the functional interface standard (that is, the interface that contains only one method), the virtual opportunity is automatically judged, however, it is best to use the annotation @ FunctionalInterface to declare the interface, so as to avoid other team members mistakenly adding new methods to the interface. Lambda syntax consists of three parts. A single parameter is separated by commas (,). A parameter is an arrow symbol for the parameters of a method in a function interface:-> method body, which can be an expression or code block, the implementation of methods in the method body functional interface. If it is a code block, it must be wrapped up with {} and a return value is required, but there is an exception, if the return value of the method in the function interface is void, you do not need to {} The overall looks like this 1 (parameters)-> expression or (parameters)-> {statements ;} this is my overview of lambda. The above sections show some of my initial experiences with Java 8. The experience with Java 8 is indeed improving the performance by about 15%, and the syntax detection is also enhanced, introducing lambda expressions is nothing more than the biggest highlight of Java 8. In this way, it is easier for us to write function operations. In general, Java 8 is all for developers.