Home  >  Article  >  Java  >  What is java8?

What is java8?

藏色散人
藏色散人Original
2019-05-22 16:07:5516621browse

Java8, also known as jdk1.8, is a major version of Java language development. Oracle released the Java 8 version on March 18, 2014, which supports functional programming, a new JavaScript engine, a new date API, etc.

What is java8?

New features

Java8 has added a lot of new features, we mainly discuss the following:

● Lambda expression − Lambda allows the function to be used as a parameter of a method (the function is passed into the method as a parameter.

● Method reference − Method reference provides a very useful syntax, which can directly reference the There are methods or constructors of Java classes or objects (instances). Used in conjunction with lambda, method references can make the language construction more compact and concise, reducing redundant code.

● Default method − The default method is a There is an implementation method in the interface.

● New tools − New compilation tools, such as: Nashorn engine jjs, class dependency analyzer jdeps.

● Stream API − Newly added Stream API (java.util.stream) introduces true functional programming style into Java.

● Date Time API − Enhances the processing of dates and times.

● Optional class − Optional Class has become part of the Java 8 class library to solve null pointer exceptions.

● Nashorn, JavaScript engine − Java 8 provides a new Nashorn javascript engine, which allows us to run specific javascript on the JVM application.

The above is the detailed content of What is java8?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is maven in javaNext article:What is maven in java