Java8 New Features - Introduction

  It has been a long time since java8 came out, but I haven't used it in the previous project, so I just know a little bit. I just changed to a new company recently, and I need to use java8 for development in the development, so I will come and learn it immediately. Java8 has new features.

1. New features

  1. Lambda expressions (important)

  2. Functional interface

  3. Method reference and constructor reference

  4.stream API (important)

  5. Default methods and static methods in interfaces

  6. New date and time

  The above knowledge points are intended to be mainly learned later.

 

2. Advantages

  1. Fast and efficient. (The underlying data structure has been optimized, and the gc has been optimized)

  2. The development is convenient and more concise. (lambda expression)

  3. Powerful stream API (more to use the database to process the data to process the collection data)

  4. Convenient parallelism

  5. Maximize the reduction of null pointer exceptions Optional

 

  This article briefly introduces some new features and advantages of java8, and gradually learns the new features of java8 from the following essays.

 

Guess you like

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